Typo fixes for day 14

pull/289/head
ThomSullivan 3 years ago
parent d0c066fcb9
commit 12b1ce476e

@ -130,7 +130,7 @@ const rootElement = document.getElementById('root')
ReactDOM.render(<App />, rootElement) ReactDOM.render(<App />, rootElement)
``` ```
### getDerivedStateFromPros ### getDerivedStateFromProps
As we can understand from the name, this method derives a state from props. The getDerivedStateFromProps() method is called right before rendering the component in the DOM. This the right place to set the state object based on the initial props. As we can understand from the name, this method derives a state from props. The getDerivedStateFromProps() method is called right before rendering the component in the DOM. This the right place to set the state object based on the initial props.
@ -427,7 +427,7 @@ class App extends Component {
shouldComponentUpdate(nexProps, nextState) { shouldComponentUpdate(nexProps, nextState) {
console.log(nextProps, nextState) console.log(nextProps, nextState)
// if the return is true, the application will never update. // if the return is not true, the application will never update.
return true return true
} }

Loading…
Cancel
Save