reactjs / reactjs/react.dev

[Typo]: `useOptimistic` is missing from Hooks reference page

Aperta Adatta ai principianti
#8,570 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

type: typos
Lingua principale
JavaScript
Stelle
11.8k
Fork
7.9k
Merge medio
1g 11h
PR unite (30g)
11

Descrizione

Summary

The useOptimistic hook is listed in the left navigation menu but is missing from the Built-in React Hooks overview page, leaving the page incomplete with only 17 of the 18 hooks documented.

Page

https://react.dev/reference/react/hooks

Details
Description

The left navigation menu under Hooks lists 18 hooks, but the Built-in React Hooks overview page only documents 17 of them. useOptimistic is present in the sidebar but not mentioned anywhere on the overview page.

Steps to reproduce
  1. Open https://react.dev/reference/react/hooks
  2. Count the hooks documented on the page
  3. Compare with the hooks listed in the left navigation menu under Hooks
Expected

useOptimistic should be listed in the State Hooks section of the overview page, alongside useState and useReducer, since it lets you show a different state while an async action is pending.

Actual

useOptimistic is missing from the overview page entirely.

Suggested fix

Add useOptimistic to the State Hooks section in src/content/reference/react/hooks.md:

  • useOptimistic lets you show a different state while an async action is pending.
Screen Capture
Image
Additional Context:

The overview page is often the first place developers look when exploring React's built-in hooks. Having useOptimistic absent from this page means:

  • Developers new to React may not discover it exists at all, since the overview page is designed to be the exhaustive entry point for all built-in hooks.
  • It creates an inconsistency between the sidebar navigation and the page content
  • useOptimistic is particularly relevant in modern React apps that use Server Actions and async transitions — a growing pattern — so its visibility on the overview page is especially valuable for developers adopting these features.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da src/content/reference/react/hooks.md e ispeziona la sezione State Hooks, confrontandola con la navigazione di Hooks e la pagina di riferimento di useOptimistic. Conferma che la panoramica elenchi tutti i 18 hook e che la nuova voce rimandi a /reference/react/useOptimistic con la descrizione indicata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, react
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
1/5
Tempo stimato
Meno di un'ora
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
82/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.