React Cheat Sheet
React Architecture
Functional Components
EASY
JSX
Syntax pairing JS logic with declarative UI markup.
Props vs State
Props: immutable/external. State: mutable/internal.
Conditional Rendering
UI display based on boolean logic or state.
Composition
Using 'children' to build decoupled component trees.
Core Hooks
MEDIUM
useState
Primitive for tracking local reactive state.
useEffect
Handles side effects and system synchronization.
useContext
Consumes data from a Context Provider.
useRef
Persistent reference without triggering re-renders.
Optimization
HARD
useMemo
Memoizes expensive computation results.
useCallback
Memoizes function references between renders.
React.memo
Skips re-renders if props are shallowly equal.