0Pricing
React Academy · Lesson

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

  1. React Server Components Explained
  2. The use() Hook for Async Resources
  3. React Actions & useActionState
  4. useOptimistic for Instant Feedback
← Back to React Academy