Programming flashcards

React Hooks Essentials

Core React hooks and when to use them in modern component code.

10 cards By @mazo
#react#hooks#javascript#frontend
Study this deck Browse Programming

Card preview

Card 1 useState

Stores local component state and provides a setter.

Card 2 useEffect

Runs side effects after render, such as subscriptions or data loading.

Card 3 useMemo

Memoizes an expensive computed value between renders.

Card 4 useCallback

Memoizes a function reference between renders.

Card 5 useRef

Stores a mutable value that does not trigger re-render when changed.

Card 6 useReducer

Manages state with a reducer function for more structured updates.

Card 7 Custom hook

A reusable function that calls hooks and encapsulates component logic.

Card 8 Effect cleanup

A function returned from useEffect to remove listeners, timers, or subscriptions.