Skip to content

Commit 3abad95

Browse files
committed
docs: add useOptimistic to Hooks overview
Signed-off-by: Sebastian Legarraga <64795732+slegarraga@users.noreply.github.com>
1 parent c7d6b70 commit 3abad95

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/content/reference/react/hooks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ To add state to a component, use one of these Hooks:
1818

1919
* [`useState`](/reference/react/useState) declares a state variable that you can update directly.
2020
* [`useReducer`](/reference/react/useReducer) declares a state variable with the update logic inside a [reducer function.](/learn/extracting-state-logic-into-a-reducer)
21+
* [`useOptimistic`](/reference/react/useOptimistic) lets you show a different state while an async action is pending.
2122

2223
```js
2324
function ImageGallery() {

0 commit comments

Comments
 (0)