reactjs / reactjs/react.dev

[Suggestion]: Add Async React Hooks section to hooks

Abierto
#8,316 2 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

type: documentation
Lenguaje dominante
JavaScript
Estrellas
11.8k
Forks
7.9k
Merge medio
1 d 11 h
PR fusionados (30 d)
11

Descripción

Summary

Update the hooks page to include a section on Async React hooks useTransition, useActionState, and useOptimistic

Page

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

Details

The current hooks page has a very React 18 thinking of useTransition (in the Performance Hooks section), useActionState (in other hooks), and is missing the useOptimistic hook. I believe these hooks are better served by being placed in a single section to help spread the React 19 thinking about these hooks.

Proposed Async React Hooks section


Async React Hooks {/async-react-hooks/}

Async React lets you build responsive apps by running async work in Actions callbacks passed to startTransition or action props. State updates from useActionState and useOptimistic must run inside an Action.

  • useTransition lets you mark state updates as non-blocking so the UI stays responsive while they run.
  • useActionState lets you update state from an Action, for form submissions or async reducers.
  • useOptimistic lets you show a temporary UI state while an Action is running.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza por la página de React hooks enlazada en el issue y revisa cómo están organizadas las secciones existentes de Performance Hooks y de otros hooks. Añade, como se propone, una sección de Async React Hooks que cubra useTransition, useActionState y useOptimistic, y después verifica que los enlaces y la redacción de la página sean correctos.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, react
Área
documentation
Tipo de issue
Documentación
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
55/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.