react-snippets
rcjc
class componentName extends Component {render() {
return (
<div>
</div>
);
}
}
con
constructor(props) {super(props);
}
方法
cwm→ componentWillMount methodcdm→ componentDidMount method
cwr→ componentWillReceiveProps method
scu→ shouldComponentUpdate method
cwup→ componentWillUpdate method
cdup→ componentDidUpdate method
cwun→ componentWillUnmount method
sst
this.setState('');
ssf
this.setState((state, props) => { return { }});
props
this.props
react 的生命周期:
以上是 react-snippets 的全部内容, 来源链接: utcz.com/z/382408.html