Part 07 · React · 7.1

Render là calculation, effects là synchronization

React giữ state theo position/identity và commit UI sau render; component phải thuần để scheduler có thể render lại, interrupt hoặc discard work an toàn.

Cách học: với mỗi feature, xác định state owner/identity, render invariant, external synchronization, failure boundary và evidence từ profiler/test.
01 · Render

Render & identity

Trigger, render, commit, keys, state position và purity.

02 · State

Snapshots, queues & immutability

Batching, functional updates, reducer và state ownership.

03 · Effects

Effects & synchronization

Dependencies, cleanup, races và external systems.

04 · Escape hatch

Refs & DOM

Focus, measurement, imperative API và lifecycle.

05 · Design

State, forms & context

Reducers, controlled inputs, ownership và context boundaries.

06 · Hooks

Custom hooks & external stores

Reuse logic, Rules of Hooks và consistent subscriptions.

07 · Data

Server state

Cache, Suspense, actions, optimistic UX và invalidation.

08 · UX boundaries

Errors, routing, security & a11y

Failure recovery, navigation, auth UI và accessible interaction.

09 · Performance

Profiler, memoization & compiler

Measure commits, stabilize identity and optimize only bottlenecks.

10 · Production

Testing, SSR & hydration

User-visible tests, deterministic markup and delivery evidence.