transforms/__testfixtures__/rename-unsafe-lifecycles/create-react-class.output.js (34 lines of code) (raw):
const createReactClass = require('create-react-class');
const MyComponent = createReactClass({
displayName: 'MyComponent',
mixins: [
{
UNSAFE_componentWillMount() {
// componentWillMount
},
componentDidMount() {
// componentDidMount
},
UNSAFE_componentWillUpdate(nextProps, nextState) {
// componentWillUpdate
},
componentDidUpdate(prevProps, prevState) {
// componentDidUpdate
},
UNSAFE_componentWillReceiveProps(nextProps) {
// componentWillReceiveProps
},
componentWillUnmount() {
// componentWillUnmount
},
},
],
UNSAFE_componentWillMount() {
// componentWillMount
},
componentDidMount() {
// componentDidMount
},
UNSAFE_componentWillUpdate(nextProps, nextState) {
// componentWillUpdate
},
componentDidUpdate(prevProps, prevState) {
// componentDidUpdate
},
UNSAFE_componentWillReceiveProps(nextProps) {
// componentWillReceiveProps
},
componentWillUnmount() {
// componentWillUnmount
},
render() {
// render
},
});