Put in order · JavaScript and React course · Module 5: useEffect and Custom Hooks
AbortController in useEffect
Arrange the steps for handling fetch with AbortController in useEffect:
Items to put in order
- Create an AbortController
- Pass the signal to fetch()
- Call controller.abort() in cleanup
- Handle the response and update state
You can check the correct answer by solving this task in the CodeWorlds game.