EduardSE
Reactiflux3y ago
4 replies
EduardS

Is a function that calls custom hooks also a custom hook?

Let's say I have a custom hook useLocaleStorage implemented with useState and useEffect then it is considered a hook because it uses built-in hooks. If then I create a function getTheme and I use useLocalStorage inside it then is getTheme considered a custom hook because the useLocaleStorage itself uses built-in hooks?
Was this page helpful?