-
Notifications
You must be signed in to change notification settings - Fork 1
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
Cambio-TontoDelDia #55
Conversation
frontend/src/Pagina/Inicio.jsx
Outdated
const { cargaa } = useNombres(); | ||
const { carga } = useNombres(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hay que borrar estas dos líneas porque te dan conflictos
También se creó un HOOK para el componente y se agregó la URL a la parte de la API. 🛠️
frontend/src/Pagina/Inicio.jsx
Outdated
|
||
const Inicio = () => { | ||
const { cargaa } = useNombres(); | ||
const { tonto } = useObtenerTonto(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hay algo raro acá. No aparecen mis cambios.
Fijate el PR que hice yo: #51
Por qué no aparecen mis cambios acá???
frontend/src/Pagina/Inicio.jsx
Outdated
const { tonto } = useObtenerTonto(); | ||
|
||
if (cargaa) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vos mismo agregaste este componente de carga, ya no lo querés?
Por qué lo estás borrando?
No me descanse 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capaz que no entendes completamente cómo funciona esto.
Cada hook tiene su variable de carga y sus datos.
Los hooks son independientes entre ellos y pueden estar los dos cargando a la vez.
Si vos querés mostrar un componente de carga para un hook tenes que usar la variable de carga de ese hook.
En este caso estabas usando la variable de carga de un hook y los datos de otro hook diferente.
Hace dos cosas:
|
…into Cambios-TontoDelDia
Creo que ya quedó franco. |
Me olvidé de borrar el componente que no se usa. 🤦♂️💻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sabeee 👏 👏
No description provided.