frontend / README.md

React

2 min read index source

React

Baseline: React 19.2 with React Compiler 1.0 assumed. See ../../STACK_BASELINE.md.

The compiler changes advice, not just versions. Auto-memoization means most manual useMemo/useCallback guidance is now wrong for new code. Files below still carrying the old advice are flagged; the rewrite is phase 7 in ../../PLAN.md.

Mental model

File Covers
react.md what React is, JSX, the component model
element_vs_component.md elements are descriptions, components are functions
state_vs_props.md the two inputs, and who owns each
prop_children.md composition via children
react_fragment.md grouping without a wrapper node
key_property.md list identity, and why index keys corrupt state

Rendering internals

File Covers
virtual_dom.md what the VDOM is and isn’t
shadow_dom_vs_virtual_dom.md unrelated concepts with confusable names
react_fiber.md the fiber architecture
reconciliation.md diffing, bailouts, when subtrees remount
concurrent_rendering.md interruptible rendering, transitions
lifecycle.md mount/update/unmount, effects as the modern equivalent
synthetic_events.md the event delegation layer
react_portal.md rendering outside the parent DOM node

Hooks

File Covers
useful_hooks.md the built-in set
use_effect_deep.md dependencies, cleanup, and when you don’t need an effect
use_ref.md mutable boxes and DOM handles
stale_closures_and_hook_rules.md the classic hook bug and the rules that prevent it
controlled_vs_uncontrolled.md form state ownership

Performance

File Covers
react_compiler.md the compiler — read this before the memo files
react_memo.md manual memoization: mechanism, and when the compiler bails out
pure_components.md purity and bailout conditions
context_performance.md why context re-renders everything, and the splitting fix

Server rendering and data

File Covers
server_components.md RSC — what runs where
hydration.md attaching to server HTML, and mismatch errors
suspense_for_data.md Suspense as a data-loading boundary
react_19.md what landed in 19

Patterns

File Covers
hoc.md higher-order components (largely superseded by hooks)
mvc_pattern.md how React relates to MVC

Known gaps

A 9,850-line vendored copy of a third-party interview-questions repo previously sat at this path. It carried sponsor banners, was largely class-component-era React, and duplicated the files above. It was removed in phase 2; recover it from git history if needed.