Lesson 1
The Death of useEffect for Fetching
The new use API
The Shift: We no longer need useEffect + useState + loading flags for simple data fetching. We can "unwrap" promises directly in render.
👀 Preview
The screen shows "Loading Profile..."....network request finishes...Instantly snaps to "Cristian" without a single useEffect.
📚 Explanation
React 19's `use` hook allows you to unwrap promises directly in render. Combined with Suspense, this eliminates the need for manual loading state management. The component automatically suspends until the promise resolves.
App.tsx
How well did you remember this?