From 4ec3ed8dd39469977cc6c497136a7f9ec8a2bc75 Mon Sep 17 00:00:00 2001 From: s0alken Date: Thu, 11 May 2023 19:31:12 -0400 Subject: [PATCH] Adding translation to Special Props Warning --- src/content/warnings/special-props.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/warnings/special-props.md b/src/content/warnings/special-props.md index 1646b531a..25a05f538 100644 --- a/src/content/warnings/special-props.md +++ b/src/content/warnings/special-props.md @@ -1,7 +1,7 @@ --- -title: Special Props Warning +title: Advertencia de props especiales --- -Most props on a JSX element are passed on to the component, however, there are two special props (`ref` and `key`) which are used by React, and are thus not forwarded to the component. +En un elemento JSX, la mayoría de las props se pasan al componente, pero hay dos props especiales (`ref` y `key`) que React utiliza y que no se transmiten al componente. -For instance, you can't read `props.key` from a component. If you need to access the same value within the child component, you should pass it as a different prop (ex: `` and read `props.id`). While this may seem redundant, it's important to separate app logic from hints to React. +Por ejemplo, no es posible acceder a `props.key` desde un componente. Si necesitas utilizar ese valor dentro del componente hijo, debes pasar el valor como una prop diferente (por ejemplo: `` y leer `props.id`). Aunque parezca redundante, es importante separar la lógica de la aplicación de las pistas para React.