Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Translate choosing-the-state-structure.md #608

Merged
merged 30 commits into from
Mar 23, 2023

Conversation

Radapls
Copy link
Contributor

@Radapls Radapls commented Nov 22, 2022

Traducción del apartado "Choose the state structure" completada. Quedo atento a cualquier corrección

@github-actions
Copy link

github-actions bot commented Jan 11, 2023

Size Changes

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

This PR introduced no changes to the javascript bundle 🙌


</YouWillLearn>

## Principles for structuring state {/*principles-for-structuring-state*/}
## Principios para la estructuración del estado {/*principles-for-structuring-state*/}

When you write a component that holds some state, you'll have to make choices about how many state variables to use and what the shape of their data should be. While it's possible to write correct programs even with a suboptimal state structure, there are a few principles that can guide you to make better choices:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esta sección está sin traducir

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisando mis commits, encontré que realmente no lo había traducido. Ya se encuentra traducido


Ideally, you would also remove the deleted items (and their children!) from the "table" object to improve memory usage. This version does that. It also [uses Immer](/learn/updating-objects-in-state#write-concise-update-logic-with-immer) to make the update logic more concise.

Idealmente, también eliminaría los elementos eliminados (¡y sus hijos!) del objeto "tabla" para mejorar el uso de la memoria. Esta versión lo hace. También [usa Immer](/learn/updating-objects-in-state#write-concise-update-logic-with-immer) para hacer que la lógica de actualización sea más concisa.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Es importante mantener el mismo número de línea del original para poder manejar correctamente los conflictos en futuras actualizaciones del contenido

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Este cambio en el número de lineal se dio por una actualización en la rama principal

Comment on lines 364 to 370

This way it won't get out of sync with the prop passed from the parent component.

"Mirroring" props into state only makes sense when you *want* to ignore all updates for a specific prop. By convention, start the prop name with `initial` or `default` to clarify that its new values are ignored:

De esta forma, no se sincroniza con la propiedad que se pasa desde el componente principal.

"Reflejar" props en estado solo tiene sentido cuando *quieres* ignorar todas las actualizaciones de un prop en específico. Por convención, comience el nombre de la prop con `initial` or `default` para aclarar que sus nuevos valores se ignoran:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esta sección difiere de la original y uno de los párrafos no está traducido. Parece un error ocasionado por una resolución de conflictos.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corregido, justo fue en una de las tantas actualizaciones de la rama.

Copy link
Member

@carburo carburo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¡Hola, @Radapls! ¡Gracias por tu contribución! No he hecho una revisión completa porque hay secciones sin traducir y algunos conflictos no del todo resueltos que te he dejado en los comentarios.

Copy link
Member

@carburo carburo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¡Hola, @Radapls! He dejado varios comentarios, pero sobre todo son cambios en el uso de la conjugación de la segunda persona del singular. En esta documentación usamos siempre «tú» para mantener la consistencia entre las páginas y suele prestarse menos a ambigüedades (https://github.com/reactjs/es.reactjs.org/blob/main/TRANSLATION.md#usted-tú-y-vos).
Todos los comentarios están en forma de sugerencias que pueden aplicarse directamente desde la interfaz de GitHub.

beta/src/content/learn/choosing-the-state-structure.md Outdated Show resolved Hide resolved
beta/src/content/learn/choosing-the-state-structure.md Outdated Show resolved Hide resolved
beta/src/content/learn/choosing-the-state-structure.md Outdated Show resolved Hide resolved
beta/src/content/learn/choosing-the-state-structure.md Outdated Show resolved Hide resolved
beta/src/content/learn/choosing-the-state-structure.md Outdated Show resolved Hide resolved
beta/src/content/learn/choosing-the-state-structure.md Outdated Show resolved Hide resolved
beta/src/content/learn/choosing-the-state-structure.md Outdated Show resolved Hide resolved
beta/src/content/learn/choosing-the-state-structure.md Outdated Show resolved Hide resolved
beta/src/content/learn/choosing-the-state-structure.md Outdated Show resolved Hide resolved
beta/src/content/learn/choosing-the-state-structure.md Outdated Show resolved Hide resolved
Radapls and others added 16 commits March 23, 2023 11:59
@Radapls
Copy link
Contributor Author

Radapls commented Mar 23, 2023

Hola @carburo , gracias por los comentarios. Los tendré en cuenta para actualizar el tiempo en las traducciones. ¡Gracias!

PD: Disculpa la lluvia de commits, estaba aceptando uno a uno, luego descubrí que podía anidarlos en uno solo 😅

Copy link
Member

@carburo carburo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¡Muchas gracias! 🚀

@carburo carburo merged commit a42fb99 into reactjs:main Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants