diff --git a/client/src/pages/guide/english/certifications/front-end-libraries/react/use-the-lifecycle-method-componentwillmount/index.md b/client/src/pages/guide/english/certifications/front-end-libraries/react/use-the-lifecycle-method-componentwillmount/index.md index bd242ac698..b260882d1f 100644 --- a/client/src/pages/guide/english/certifications/front-end-libraries/react/use-the-lifecycle-method-componentwillmount/index.md +++ b/client/src/pages/guide/english/certifications/front-end-libraries/react/use-the-lifecycle-method-componentwillmount/index.md @@ -3,51 +3,23 @@ title: Use the Lifecycle Method componentWillMount --- ## Use the Lifecycle Method componentWillMount -This challenges introduces the ``` componentWillMount ``` Lifecycle method. This is used to set state after a giventime period. +The challenge is a basic introduction to React's LifeCycle components. +These methods are also called Lifecycle Hooks. -The syntax for the method is: -```javascript -componentDidMount() { - setTimeout( () => { - this.setState({ - one: 1, - two: false - }); - }, interval); - } -``` -where ``` one ``` and ``` two ``` are states you want to set after ``` interval ```ms. +### Hint 1 -### Hint +Log something to the console in the ```react componentWillMount ``` method. -Use -```javascript -this.state.stateName -``` -and change ``` stateName ``` as required. +### Hint 2 + +The `` console.log(); `` statement is used to log to the browser console. ### Solution -Change -```javascript -render() { - return ( -