Skip to content

Latest commit

 

History

History
15 lines (15 loc) · 332 Bytes

File metadata and controls

15 lines (15 loc) · 332 Bytes

React: Use the Lifecycle Method componentWillMount

class MyComponent extends React.Component {
  constructor(props) {
    super(props);
  }
  componentWillMount() {
    // change code below this line
    console.log("will mount method");
    // change code above this line
  }
  render() {
    return <div />
  }
};