Masan1489 Masan1489
  • 02-12-2021
  • Computers and Technology
contestada

Why is my use effect not working react native.

Respuesta :

spiderman71
spiderman71 spiderman71
  • 02-12-2021

The reason this happens is because the api call is asynchronus, it doesn't populate the state immediately, so the render happens first and tries to read current from the initial weather state null in the render method make sure not to read weather

Answer Link

Otras preguntas

Max is 135 centimeters tall he is 18 centimeters taller than Rita Rita is 30 centimeters shorter than Jan how tall is jan.
In what way does the executive branch check the powers of the legislative branch?
Factorise this 72-6x
when two air masses of different temperatures come together, they can cause a
PLEASE HELP I GIVE THANKS
I have no idea how to use this site yet, so I'm just gonna put my algebra problem here. Thanks for any help! Graph system of equation: x-2y=2 3+y=6
3x+y=5 , 2x-2y=22 solve the system of equations by the addition method
how does deforestation affect the patterns of river flow
The British Museum has a letter that is regarded as the oldest valentine in existence, although it’s a rather sad one. Who and when wrote it?
Can anyone help me with this