Custom Hooks
A custom hook is a plain function starting with 'use' that calls other hooks, extracting stateful logic — not state itself — for reuse; each component calling it gets fully independent state. The 'use' prefix is what lets the lint rules verify hook ordering inside it.
This Concept is waiting for its first lesson!
A custom hook is a plain function starting with 'use' that calls other hooks, extracting stateful logic — not state itself — for reuse; each component calling it gets fully independent state. The 'use' prefix is what lets the lint rules verify hook ordering inside it.
Are you a teacher? Sign in to start contributing.
Sign In