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

What does the author most likely mean by "memory is an abstract painting"? We remember events in vague and indistinct ways. We usually respond to art that sh
The days and nights are always of equal time throughout the year at the equator. True False
What was the purpose of the Articles of Confederation? When were the Articles ratified? What was the purpose of the central government, according to the Article
Beth filled 31 jars with paint if each jar holds 1 pint of paint how many gallons of paint did Beth use?
People with higher levels of the _____ trait are more likely to attend and complete college.
An animal shelter spends $2.35 per day to care for each cat and $5.50 per day to care for each dog. Pat
The safest bonds are ones from the​
Which statements are true
This photo shows raised and indented areas on the base of the bullet. What is the term for these areas? A) pits and hills B) lands and grooves C) bumps and gu
which sentence describes a factor that contributed to the communist victory in the Chinese Civil War? A. The communists controlled thee factories of the urban a