Practice
The callback function is invoked when setState has finished and the component has been rendered. Since
Note. It is recommended to use a lifecycle method rather than this callback function.
setState({ name: 'John' }, () => console.log('The name has updated and component re-rendered'))
Sign in and the lectures you have studied will be marked in this list.
Choose a course
Comments