You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Con un mismo INPUT siempre vamos a tener un mismo OUTPUT
No terner efectos secundarios:
Muta un estado global
Modificar archivos o realizar pedidos a internet
llamar efectos externos
loggear en la consola, modificar el DOM
llamar a otra función que tenga efectos secundarios
No hay estados compartidos
No utiliza variable externas
Composición
Combinar funciones para devolver un valor
Hacer pequeñas funciones y reutilizarlas
First class y high order functions
Las funciones son utilizadas como cualquier tipo de dato
Funciones que toman funciones como parametros o devuelven funciones
redux-thunk y bind
Recursión
Facil de Testear
Opuesto a la programación orientada objetos, no significa que no se puedan usar juntas
// No PuroclassUserextendsReact.Component{getUserInfo(){// ...busca la información del usuario}render(){return(<Profilename={this.state.user.name}/>)}}// PurofunctionProfile(props){return(<h1>{props.name}</h1>);}