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

find the slope of the line that contains (1,6) and (10, -9).
What changes were made in Utah during World War 1?
What did Enlightenment thinkers believe predated society and was superior to the laws of the church or the state?
What are 5 pros and cons of living in sparta and athens in greece?
_ is 8% of 200, please help and show work, thanks
Find all points having an x-coordinate of 4 whose distance from the point (-2,-1) is 10
what produces the motion of air convection
if hares with long legs run faster than hares with short legs, which hares do you expect would be most likely to survive and reproduce
what is 140/216 in simplest forms
which of the following sentences contains a verb phrase? A.I shall be all that I am and more B. the crowed roared as the bull charged. C.I believed every word h