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

WIP: Optimizing performance #191

Closed
wants to merge 11 commits into from

Conversation

RamirezAlex
Copy link
Contributor

@DanielGarc please review this and take over :)

@netlify
Copy link

netlify bot commented Mar 4, 2019

Deploy preview for es-reactjs ready!

Built with commit 7564de2

https://deploy-preview-191--es-reactjs.netlify.com

@DanielGarc
Copy link
Contributor

@RamirezAlex I will review it this afternoon. Thank you.


```
npm run build
```

This will create a production build of your app in the `build/` folder of your project.
Esto creará una *build* de producción de tu aplicación el directorio `build/` de tu proyecto.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Esto creará una *build* de producción de tu aplicación el directorio `build/` de tu proyecto.
Esto creará una *build* de producción de tu aplicación en el directorio `build/` de tu proyecto.

* The [`envify`](https://github.com/hughsk/envify) transform ensures the right build environment is set. Make it global (`-g`).
* The [`uglifyify`](https://github.com/hughsk/uglifyify) transform removes development imports. Make it global too (`-g`).
* Finally, the resulting bundle is piped to [`uglify-js`](https://github.com/mishoo/UglifyJS2) for mangling ([read why](https://github.com/hughsk/uglifyify#motivationusage)).
* La transformación [`envify`](https://github.com/hughsk/envify) asegura que el ambiente de la *build* sea correcto. Hazlo lo global (`-g`).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* La transformación [`envify`](https://github.com/hughsk/envify) asegura que el ambiente de la *build* sea correcto. Hazlo lo global (`-g`).
* La transformación [`envify`](https://github.com/hughsk/envify) asegura que el ambiente de la *build* sea correcto. Hazlo global (`-g`).

* The [`uglifyify`](https://github.com/hughsk/uglifyify) transform removes development imports. Make it global too (`-g`).
* Finally, the resulting bundle is piped to [`uglify-js`](https://github.com/mishoo/UglifyJS2) for mangling ([read why](https://github.com/hughsk/uglifyify#motivationusage)).
* La transformación [`envify`](https://github.com/hughsk/envify) asegura que el ambiente de la *build* sea correcto. Hazlo lo global (`-g`).
* La transformación [`uglifyify`](https://github.com/hughsk/uglifyify) remueve los import de desarollo. Hazlo global tambien (`-g`).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* La transformación [`uglifyify`](https://github.com/hughsk/uglifyify) remueve los import de desarollo. Hazlo global tambien (`-g`).
* La transformación [`uglifyify`](https://github.com/hughsk/uglifyify) remueve los *imports* de desarollo. Hazlo global también (`-g`).

I think we should use the same format for 'imports' as we do for 'build' and others.

@@ -133,18 +131,18 @@ plugins: [
]
```

For a complete setup example [see this gist](https://gist.github.com/Rich-Harris/cb14f4bc0670c47d00d191565be36bf0).
Para un ejemple de configuración completo [mira este gist](https://gist.github.com/Rich-Harris/cb14f4bc0670c47d00d191565be36bf0).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Para un ejemple de configuración completo [mira este gist](https://gist.github.com/Rich-Harris/cb14f4bc0670c47d00d191565be36bf0).
Para un ejemplo de configuración completo [mira este gist](https://gist.github.com/Rich-Harris/cb14f4bc0670c47d00d191565be36bf0).


Remember that you only need to do this for production builds. You shouldn't apply `UglifyJsPlugin` or `DefinePlugin` with `'production'` value in development because they will hide useful React warnings, and make the builds much slower.
Recuerda que solo necesitas hacer para las *builds* de producción. No deberias aplicar `UglifyJsPlugin` o `DefinePlugin` con valor `'production'` en desarrollo, por que ocultaran las advertencias de React y hará las *builds* mucho más lentas.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Recuerda que solo necesitas hacer para las *builds* de producción. No deberias aplicar `UglifyJsPlugin` o `DefinePlugin` con valor `'production'` en desarrollo, por que ocultaran las advertencias de React y hará las *builds* mucho más lentas.
Recuerda que solo necesitas hacer esto para las *builds* de producción. No deberias aplicar `UglifyJsPlugin` o `DefinePlugin` con valor `'production'` en desarrollo, por que ocultaran las advertencias de React y hará las *builds* mucho más lentas.


## Profiling Components with the Chrome Performance Tab {#profiling-components-with-the-chrome-performance-tab}

In the **development** mode, you can visualize how components mount, update, and unmount, using the performance tools in supported browsers. For example:
En el modo de **desarrollo**, puedes visualizar como montar componentes, actualizarlos y desmontarlos usando las herramientas para rendimiento soportadas por los navegadores. Por ejemplo:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
En el modo de **desarrollo**, puedes visualizar como montar componentes, actualizarlos y desmontarlos usando las herramientas para rendimiento soportadas por los navegadores. Por ejemplo:
En el modo de **desarrollo**, puedes visualizar cómo se montan los componentes, actualizan y desmontan, usando las herramientas para rendimiento soportadas por los navegadores. Por ejemplo:

@DanielGarc
Copy link
Contributor

DanielGarc commented Mar 6, 2019

@Darking360 I made a bunch of comments of what should be updated (mainly typos and accents), there is also some (maybe half) translation needed, I can do this but, this is one of my firsts contributions and I'm not sure what's the best way to go about it. Should I create a new branch for this page and make the updates or is there a way to keep working on @RamirezAlex branch. Thank you!

edit: fixed typos.

@Darking360
Copy link
Collaborator

@DanielGarc Good morning. Ok I see, so let's do this, create a new branch and merge the changes from this one into the new branch and you can continue the work there, I'll close this PR and wait for yours with all the final work, that way merging this branch the changes from @RamirezAlex won't get lost or anything 💪 and both contributions will be added to the final version.

Let me know if you have any question, if you don't I'll close it now. Please tag me as soon as you open the PR for your new branch 🚀

@Darking360 Darking360 closed this Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants