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 的生命周期:

react-snippets

相关文章:

  • 2022-12-23
  • 2021-09-10
  • 2021-07-27
  • 2021-08-23
  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-17
  • 2022-01-17
  • 2021-11-23
  • 2021-09-13
  • 2021-06-08
相关资源
相似解决方案