-
Notifications
You must be signed in to change notification settings - Fork 291
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
Translated React without JSX #120
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to the project @vickvasquez!
For the future, before translating an article you should request it in #4 in order to avoid duplicated effort.
I made some corrections. Check it out and tell me what you think.
content/docs/react-without-jsx.md
Outdated
|
||
Each JSX element is just syntactic sugar for calling `React.createElement(component, props, ...children)`. So, anything you can do with JSX can also be done with just plain JavaScript. | ||
Cada elemento JSX es solamente azucar sintactico para llamar `React.createElement(component, props, ...children)`. Por lo tanto, cualquier cosa que se pueda hacer con JSX se puede hacer con Javascript puro. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cada elemento JSX es solamente azucar sintactico para llamar `React.createElement(component, props, ...children)`. Por lo tanto, cualquier cosa que se pueda hacer con JSX se puede hacer con Javascript puro. | |
Cada elemento JSX es solamente azúcar sintáctico para llamar a `React.createElement(component, props, ...children)`. Por lo tanto, cualquier cosa que se pueda hacer con JSX se puede hacer con Javascript puro. |
content/docs/react-without-jsx.md
Outdated
@@ -4,14 +4,14 @@ title: React Without JSX | |||
permalink: docs/react-without-jsx.html | |||
--- | |||
|
|||
JSX is not a requirement for using React. Using React without JSX is especially convenient when you don't want to set up compilation in your build environment. | |||
JSX no es un requisito para usar React. Usar react sin JSX es especialmente conveniente cuando no necesitas configurar herramientas de compilacion en tu ambiente de desarrollo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSX no es un requisito para usar React. Usar react sin JSX es especialmente conveniente cuando no necesitas configurar herramientas de compilacion en tu ambiente de desarrollo. | |
JSX no es un requisito para usar React. Usar React sin JSX es especialmente conveniente cuando no quieres configurar herramientas de compilación en tu entorno de desarrollo. |
content/docs/react-without-jsx.md
Outdated
|
||
```js | ||
class Hello extends React.Component { | ||
class Hello extends React.Component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yo should not change code samples
class Hello extends React.Component | |
class Hello extends React.Component { |
@@ -22,8 +22,7 @@ ReactDOM.render( | |||
document.getElementById('root') | |||
); | |||
``` | |||
|
|||
can be compiled to this code that does not use JSX: | |||
se puede compilar a este que no usa JSX: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change the spacing in the line numbers in the original article. It makes our lives easier for reviewing.
se puede compilar a este que no usa JSX: | |
se puede compilar a este que no usa JSX: |
content/docs/react-without-jsx.md
Outdated
@@ -38,11 +37,11 @@ ReactDOM.render( | |||
); | |||
``` | |||
|
|||
If you're curious to see more examples of how JSX is converted to JavaScript, you can try out [the online Babel compiler](babel://jsx-simple-example). | |||
Si tienes curiosidad por ver mas ejemplos de como JSX se convierte a Javascript, puedes probar el [compilador en linea de Babel](babel://jsx-simple-example). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si tienes curiosidad por ver mas ejemplos de como JSX se convierte a Javascript, puedes probar el [compilador en linea de Babel](babel://jsx-simple-example). | |
Si tienes curiosidad por ver más ejemplos de cómo JSX se convierte a Javascript, puedes probar el [compilador en línea de Babel](babel://jsx-simple-example). |
content/docs/react-without-jsx.md
Outdated
|
||
The component can either be provided as a string, or as a subclass of `React.Component`, or a plain function for stateless components. | ||
El componente puede ser proporcionada como una cadena, o como una subclase de `React.Component`, o una función simple para componentes sin estado. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El componente puede ser proporcionada como una cadena, o como una subclase de `React.Component`, o una función simple para componentes sin estado. | |
El componente puede ser proporcionado como una cadena, como una subclase de `React.Component` o una función simple para componentes sin estado. |
content/docs/react-without-jsx.md
Outdated
|
||
If you get tired of typing `React.createElement` so much, one common pattern is to assign a shorthand: | ||
Si te cansas de escribir tanto `React.createElement`, un patrón común es assignarlo a una variable corta: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Si te cansas de escribir tanto `React.createElement`, un patrón común es assignarlo a una variable corta: | |
Si te cansas de escribir tanto `React.createElement`, un patrón común es asignarlo a una variable corta: |
content/docs/react-without-jsx.md
Outdated
|
||
Alternativamente, puedes referefirte a proyectos comunitarios como [`react-hyperscript`](https://github.com/mlmorg/react-hyperscript) y [`hyperscript-helpers`](https://github.com/ohanhi/hyperscript-helpers) que ofrecen una sintaxis terser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternativamente, puedes referefirte a proyectos comunitarios como [`react-hyperscript`](https://github.com/mlmorg/react-hyperscript) y [`hyperscript-helpers`](https://github.com/ohanhi/hyperscript-helpers) que ofrecen una sintaxis terser. | |
Alternativamente, puedes remitirte a proyectos comunitarios como [`react-hyperscript`](https://github.com/mlmorg/react-hyperscript) y [`hyperscript-helpers`](https://github.com/ohanhi/hyperscript-helpers) que ofrecen una sintaxis más concisa. |
Ok, we are good. Thank you! |
Issue #112
@carburo @alejandronanez @dmoralesm