Question · JavaScript and React course · Module 5: useEffect and Custom Hooks
Custom Hook vs JavaScript Function
How does a custom hook differ from a regular JavaScript function?
Answer options
- A custom hook can use built-in React hooks (useState, useEffect)
- A custom hook is faster than a regular function
- A custom hook automatically memoizes results
- A custom hook only works in class components
You can check the correct answer by solving this task in the CodeWorlds game.