The use() Hook for Async Resources
Read promises and context in render with the use() hook in React 19.
Welcome
In this lesson you will use React 19's use() hook to read promises and context values directly inside the render function, simplifying async data access.
What Is use()?
use() is a React 19 hook that reads a resource — either a Promise or a Context — synchronously in the render function. If the Promise is pending, the component suspends and the nearest Suspense boundary shows its fallback.
import { use } from 'react';
function UserProfile({ userPromise }) {
const user = use(userPromise); // suspends if pending
return <h1>{user.name}</h1>;
}All lessons in this course
- React Server Components Explained
- The use() Hook for Async Resources
- React Actions & useActionState
- useOptimistic for Instant Feedback