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

in a walk for charity, you walk at a rate of 100 meters per minute. how long does it take to walk 2 kilometers?
A hotel has 56 guests. 35 of the guests are male. Work out 35 out of 56 as a percentage.
A piggy bank contains an equal number of pennies, nickels, dimes, and quarters. If the total amount of money in the piggy bank is $7.79, find the number of each
Jerome is writing a number in scientific notation. The number is greater than one million and less than ten million. What will be the exponent in the number Jer
simplify 5^ 3log(5)^6
A man in a photograph is 1.5 inches in height. If the man is 6 ft. tall, what is the scale.
Could someone who knows french help me write a past holiday paragraph??
Each term in Pattern G is 6 times greater than the corresponding term in Pattern H. What is the rule for Pattern G? Plz help......
when and where was Hernando de Soto born
Harry needs £400 to buy a new computer. He has saved £160 so far. What percentage has Harry saved