Comparation
Last updated
Last updated
constructor
Function components don’t need a constructor. You can initialize the state in the call. If computing the initial state is expensive, you can pass a function to useState
.
getDerivedStateFromProps
Schedule an update instead.
shouldComponentUpdate
See React.memo
.
render
This is the function component body itself.
componentDidMount
componentDidUpdate
componentWillUnmount
getSnapshotBeforeUpdate
There are no Hook equivalents for this method yet, but they will be added soon.
componentDidCatch
There are no Hook equivalents for this method yet, but they will be added soon.
getDerivedStateFromError
There are no Hook equivalents for this method yet, but they will be added soon.