diff --git a/beta/src/content/learn/managing-state.md b/beta/src/content/learn/managing-state.md index 4df058106..976cdfd8e 100644 --- a/beta/src/content/learn/managing-state.md +++ b/beta/src/content/learn/managing-state.md @@ -1,30 +1,30 @@ --- -title: Managing State +title: Gestión del estado --- -As your application grows, it helps to be more intentional about how your state is organized and how the data flows between your components. Redundant or duplicate state is a common source of bugs. In this chapter, you'll learn how to structure your state well, how to keep your state update logic maintainable, and how to share state between distant components. +A medida que tu aplicación crece, es de ayuda ser más intencional sobre cómo se organiza tu estado y cómo los datos fluyen entre tus componentes. El estado redundante o duplicado es una fuente común de errores. En este capítulo, aprenderás cómo estructurar bien tu estado, cómo mantener la lógica de actualización de estado y cómo compartir el estado entre componentes distantes. -* [How to think about UI changes as state changes](/learn/reacting-to-input-with-state) -* [How to structure state well](/learn/choosing-the-state-structure) -* [How to "lift state up" to share it between components](/learn/sharing-state-between-components) -* [How to control whether the state gets preserved or reset](/learn/preserving-and-resetting-state) -* [How to consolidate complex state logic in a function](/learn/extracting-state-logic-into-a-reducer) -* [How to pass information without "prop drilling"](/learn/passing-data-deeply-with-context) -* [How to scale state management as your app grows](/learn/scaling-up-with-reducer-and-context) +* [Cómo pensar en los cambios de la interfaz de usuario como cambios de estado](/learn/reacting-to-input-with-state) +* [Cómo estructurar bien el estado](/learn/choosing-the-state-structure) +* [Cómo "levantar el estado" para compartirlo entre componentes](/learn/sharing-state-between-components) +* [Cómo controlar si el estado se conserva o se restablece](/learn/preserving-and-resetting-state) +* [Cómo consolidar una lógica de estado compleja en una función](/learn/extracting-state-logic-into-a-reducer) +* [Cómo pasar la información sin "_prop drilling_ (taladro de props)"](/learn/passing-data-deeply-with-context) +* [Cómo escalar la administración del estado a medida que crece tu aplicación](/learn/scaling-up-with-reducer-and-context) -## Reacting to input with state {/*reacting-to-input-with-state*/} +## Reacción a la entrada de datos con el estado {/*reacting-to-input-with-state*/} -With React, you won't modify the UI from code directly. For example, you won't write commands like "disable the button", "enable the button", "show the success message", etc. Instead, you will describe the UI you want to see for the different visual states of your component ("initial state", "typing state", "success state"), and then trigger the state changes in response to user input. This is similar to how designers think about UI. +Con React, no modificarás la interfaz de usuario directamente desde el código. Por ejemplo, no escribirás comandos como "deshabilitar el botón", "habilitar el botón", "mostrar el mensaje de éxito", etc. En su lugar, describirás la interfaz de usuario que deseas ver para los diferentes estados visuales de tu componente ("estado inicial", "estado de escritura", "estado de éxito"), y luego activar los cambios de estado en respuesta a la entrada del usuario. Esto es similar a cómo los diseñadores piensan sobre la interfaz de usuario. -Here is a quiz form built using React. Note how it uses the `status` state variable to determine whether to enable or disable the submit button, and whether to show the success message instead. +Aquí tenemos un formulario de preguntas construido con React. Fíjate en cómo utiliza la variable de estado `status` para determinar si se activa o desactiva el botón de envío, y si se muestra el mensaje de éxito en su lugar. @@ -58,9 +58,9 @@ export default function Form() { return ( <> -

City quiz

+

Concurso de la ciudad

- In which city is there a billboard that turns air into drinkable water? + ¿En qué ciudad hay una valla publicitaria que convierte el aire en agua potable?