Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/content/reference/react/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ To add state to a component, use one of these Hooks:

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

```js
function ImageGallery() {
Expand Down
Loading