Series · 1 phần
React 19 — từ Rendering Model đến Production
Series tiếng Việt 28 phần dạy React như một runtime giữ UI đồng bộ với state, không phải danh sách API. Lộ trình bắt đầu từ UI-as-value, JSX, render/commit, identity, state queue, Effects và một mini renderer; sau đó suy ra cơ chế Hooks, closure, memoization, refs, reducer, custom hook và external store. Các chặng tiếp theo xử lý state ownership, Context, form, Suspense, error recovery, Actions, optimistic UI, React Compiler, concurrent scheduling, profiling, virtualization và feature architecture. Capstone cuối migrate một codebase React 18-era lên React 19.2 cùng Compiler 1.0 bằng test, trace và rollback gate có thể kiểm chứng.
01 Rendering model
Hiểu element tree, render/commit, identity, state queue và Effects trước khi dùng abstraction cấp cao.
-
Xây mental model đầu tiên: component tạo React element, React giữ UI đồng bộ với state, còn DOM chỉ là output được commit vào browser.
02 Cơ chế Hooks
Suy ra call order, closure, memoization, refs, reducer, custom hook và external-store contract.
03 State và data boundaries
Đặt state đúng owner, thiết kế Context/form và phối hợp Suspense với error recovery.
04 React 19 và Compiler
Dùng Actions, optimistic projection, Compiler 1.0 và concurrent scheduling theo contract đã kiểm chứng.
05 Production
Profile, virtualize, giữ dependency direction và migrate React 18-era lên React 19.2 có rollback.