Last active
June 4, 2017 12:53
-
-
Save dantejauregui/1abb8614dc4e3f482b6e8dbc38a015b6 to your computer and use it in GitHub Desktop.
Inmutable alternatives
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INMUTABLE alternative: | |
array.concat crea un nuevo array, pero adiciona nuevos elementos en el nuevo array | |
array.slice crea copia de un array, | |
object.assign crea copia de obj en el q pueda modificar o agregar elementos en el nuevo objeto | |
en ES6 salio la nueva alternativa SPREAD OPERATOR que afecta tanto a arrays como objects, q hace lo mismo | |
con esto podria usar "shouldComponentUpdate" para mi JSX!! | |
https://developmentarc.gitbooks.io/react-indepth/content/life_cycle/update/using_should_component_update.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment