Put in order · JavaScript and React course · Module 5: useEffect and Custom Hooks
useEffect Lifecycle
Order the effect lifecycle in useEffect:
Items to put in order
- React updates the DOM
- Component renders
- useEffect callback executes
- On next render: cleanup function from the previous effect
- Browser paints the screen
You can check the correct answer by solving this task in the CodeWorlds game.