react-snippets

rcjc

class componentName extends Component {
  render() {
    return (
      <div>
        
      </div>
    );
  }
}

con

constructor(props) {
  super(props);
  
}

方法

cwm→    componentWillMount method
cdm→    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 的生命周期:

posted on 2017-08-11 19:29  Lemo_wd  阅读(269)  评论(0编辑  收藏  举报

导航