Repository navigation
Docs async react hooks - #8352
adi-rajput wants to merge 2 commits into
Conversation
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
|
Hi maintainers 👋 |
|
I think if you rebase you'll see useOptimistic mentioned twice, since it was added to the State Hooks section up top. So maybe rebase + remove it from that section |
|
One thing I’m unsure about is moving useTransition while leaving useDeferredValue 🤔 Both were originally framed as performance APIs, but Async React has made async coordination a primary use case; for example, using useDeferredValue with Suspense while new content loads. Maybe we should keep both there and add the new Async React section for useActionState and useOptimistic. |
Description:
Update the Hooks reference page to introduce a new Async React Hooks section.
This groups together async-related hooks to better reflect React 19 patterns around Actions and improve discoverability of related APIs.
Changes:
useTransition,useActionState, anduseOptimisticunder this sectionuseActionStatefrom the Other Hooks section to avoid duplicationRelated issue(s):
Fixes #8316
Notes for reviewer:
The change is localized to the Hooks reference page and follows the existing documentation structure.
No hook behavior or API documentation was modified—only the organization of the hooks index page.
Checklist