Blog acerca de la realidad nacional, internet y las cosas que haga, nada especial.
martes, 4 de febrero de 2020
React: Playing with Functions and Classes
Have just found this. They certainly do the same, this is the result
Browser results
But the code can be quite different.
Using functions:
Using a function in React
See that we are declaring the function receives props, though at first sight one, we don't know the nature of them.
Using classes:
Using a class in React
For the class, we are not declaring it receives anything. Do I have to suppose this? May be there's a misunderstanding, and there is a proper way to declare props.
No hay comentarios:
Publicar un comentario