You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/reference/react/hooks.md
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,19 +104,35 @@ Sometimes, you can't skip re-rendering because the screen actually needs to upda
104
104
105
105
To prioritize rendering, use one of these Hooks:
106
106
107
-
- [`useTransition`](/reference/react/useTransition) lets you mark a state transition as non-blocking and allow other updates to interrupt it.
108
107
- [`useDeferredValue`](/reference/react/useDeferredValue) lets you defer updating a non-critical part of the UI and let other parts update first.
109
108
110
109
---
111
110
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
+
112
129
## Other Hooks {/*other-hooks*/}
113
130
114
131
These Hooks are mostly useful to library authors and aren't commonly used in the application code.
115
132
116
133
- [`useDebugValue`](/reference/react/useDebugValue) lets you customize the label React DevTools displays for your custom Hook.
117
134
- [`useId`](/reference/react/useId) lets a component associate a unique ID with itself. Typically used with accessibility APIs.
118
135
- [`useSyncExternalStore`](/reference/react/useSyncExternalStore) lets a component subscribe to an external store.
119
-
* [`useActionState`](/reference/react/useActionState) allows you to manage state of actions.
0 commit comments