Cómo especificar el tipo de Hook en typescrypt [ESP-ENG]
Cuándo uno empieza a desarrollar con este lenguaje de programación que a pesar de ser lenguaje para desarrollo y no para producción se encuentra con muchas cosas diferentes a lo que uno está acostumbrado y a veces puede resultar frustrante como interesante.
Este monje programación tiene propósito de evitar errores durante desarrollo y que la aplicación no lleve a errores más grandes en producción por lo tanto obliga a que el usuario que está desarrollando el código especifique qué resultados o qué tipo de datos se van a utilizar.
This programming approach aims to prevent errors during development and prevent the application from leading to larger errors in production. Therefore, it requires the user developing the code to specify what results or what type of data will be used.

For this case, I will simply show how a react function can be passed through properties, but in the child component, you must specify what this function will do and what type of data this function will receive as a parameter.

At first glance it seems a little complex to understand, but the function only says that it expects a change in state and that this same change will be of the Boolean type.
0
0
0.000
Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!
Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).
Consider setting @stemsocial as a beneficiary of this post's rewards if you would like to support the community and contribute to its mission of promoting science and education on Hive.