Skip to main content

Core Hooks for Reacts

Core hooks are the built-in functions that let function components use React features beyond local state. useEffect runs side effects after render, useRef holds a mutable value or DOM node without causing re-renders, and useContext with useReducer shares and manages state across the tree.

Stage: Hooks · Part of the React roadmap · Last reviewed 19 November 2026

What to learn in Core Hooks

Core Hooks interview questions

What does the dependency array of useEffect do?

It lists the reactive values the effect uses. React re-runs the effect after a render only if one of them changed. An empty array runs it once after mount, and omitting it runs after every render.

When would you choose useReducer over useState?

Choose useReducer when state has several related fields or when the next state depends on a named action, such as in a cart or a multi-step form. It centralises update logic in one pure function and is easier to test.

Where Core Hooks fits in the React roadmap

Core Hooks belongs to the Hooks stage (intermediate level), which takes about 25 hours. Side effects and logic reuse.

Back to the full React roadmap