dev-proPRO
OverviewLộ Trình HọcPhỏng VấnAI System
dev-pro— Thực chiến Frontend React, Next.js & Luyện phỏng vấn
contact@dev-pro.online•Code thật. Phỏng vấn thật.
Seri React Mastery8 Lộ trình · Sandbox
Seri React Mastery
8 tracks
T01
React Core Foundations0/7 hoàn thành
T02
React Hooks Mastery0/5 hoàn thành
T03
React Component Architecture & Forms0/4 hoàn thành
T04
React & Compiler: Modern Path0/4 hoàn thành
  • Bài học (4)
  • Cấu hình & Hoạt động của React Compiler12m•intermediate
  • Form Handling với useActionState & useFormStatus12m•beginner
  • Optimistic UI với useOptimistic10m•intermediate
  • Đọc Promise & Context với use() API10m•intermediate
T05
Form Engineering: RHF + Zod + Server Actions0/2 hoàn thành
T06
Advanced React Performance Patterns0/4 hoàn thành
T07
Enterprise React Testing & Production Readiness0/5 hoàn thành
T08
Production Capstone: TeamBoard0/1 hoàn thành
Tiến độ React0/32 bài
React & Compiler: Modern Path
intermediate
10 phút
#React
#use()
#Suspense

Đọc Promise & Context với use() API

Sử dụng use() để đọc Promise/Context linh hoạt bên trong câu lệnh điều kiện if.

Core Mental Model

Khác với các Hook truyền thống, use() có thể gọi bên trong câu lệnh conditional branches (if) và loops.

Key Takeaways & Principles

use(Promise) tích hợp trực tiếp với React Suspense.
use(Context) thay thế useContext và cho phép gọi có điều kiện trong if.
Promise truyền vào use() nên được tạo từ trước render để tránh lặp vô tận.