Skip to content

Commit f135fe8

Browse files
committed
docs: add Async React Hooks section and group related hooks
1 parent 40ea071 commit f135fe8

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/content/reference/react/hooks.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,35 @@ Sometimes, you can't skip re-rendering because the screen actually needs to upda
104104
105105
To prioritize rendering, use one of these Hooks:
106106
107-
- [`useTransition`](/reference/react/useTransition) lets you mark a state transition as non-blocking and allow other updates to interrupt it.
108107
- [`useDeferredValue`](/reference/react/useDeferredValue) lets you defer updating a non-critical part of the UI and let other parts update first.
109108
110109
---
111110
111+
## Async React Hooks {/*async-react-hooks*/}
112+
113+
Async React lets you build responsive apps by running asynchronous work inside Actions. These hooks help manage UI updates during asynchronous operations and allow React to keep the interface responsive while work is being processed.
114+
115+
### useTransition {/*usetransition*/}
116+
117+
Lets you mark state updates as non-blocking so the UI stays responsive while they run.
118+
119+
### useActionState {/*useactionstate*/}
120+
121+
Lets you update state from an Action, commonly used for form submissions or async reducers.
122+
123+
### useOptimistic {/*useoptimistic*/}
124+
125+
Lets you show a temporary UI state while an Action is running.
126+
127+
---
128+
112129
## Other Hooks {/*other-hooks*/}
113130
114131
These Hooks are mostly useful to library authors and aren't commonly used in the application code.
115132
116133
- [`useDebugValue`](/reference/react/useDebugValue) lets you customize the label React DevTools displays for your custom Hook.
117134
- [`useId`](/reference/react/useId) lets a component associate a unique ID with itself. Typically used with accessibility APIs.
118135
- [`useSyncExternalStore`](/reference/react/useSyncExternalStore) lets a component subscribe to an external store.
119-
* [`useActionState`](/reference/react/useActionState) allows you to manage state of actions.
120136
121137
---
122138

0 commit comments

Comments
 (0)