Question · JavaScript and React course · Module 5: useEffect and Custom Hooks
Effect Composition Patterns
What is the main advantage of extracting effects into custom hooks?
Answer options
- Custom hooks are faster than useEffect
- Automatic effect testing
- Custom hooks do not require cleanup
- Ability to reuse effect logic across multiple components
You can check the correct answer by solving this task in the CodeWorlds game.