Use the Lifecycle Method componentWillMount

Use the Lifecycle Method componentWillMount
0

#1

Tell us what’s happening:
Ohhhhh what I shoud do with that code?

Your code so far


class MyComponent extends React.Component {
  constructor(props) {
    super(props);
  }
  componentWillMount() {
    // change code below this line

    // change code above this line
  }
  render() {
    return <div />
  }
};

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/use-the-lifecycle-method-componentwillmount


#2

Why are you running a setTimeout function here?

All you need to do is just console.log out something for this challenge inside componentDidMount function.

Looks like you are copying and pasting from previous exercises. No need to do that.


#3

The link to the lesson you provided only is asking you to add code to ```willMount`` method


#5

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

Iam not joking I write console.log() and the i put the Run the test and is right.I try so much codes.Thank you for your replay and you help