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 sum of 2/9+1/9?
The ratio of Sam age to Hanks is 5 to 3. If the sum of their ages is 24, how old is Hank?
John Sells Hamburgers For $3 Each and cheeseburgers for $3.50 each. One afternoon, he sells a total of 24 burgers for $79. How Many hamburgers did he sell?
is 10 yards less than 360 inches
How do you find the interior angles of a triangle, if only one is given angle is given to you?
How is the ecological system organized?
what is greater 0.7 or 7/9?
The positive integer x is a multiple of 9 and also a multiple of 12. The smallest possible value of x is (A) 3 (B) 12 (C) 21 (D) 36 (E) 72
jessicas shoebox is 20 centimeters long and 10 centimeters wide. how many more millimeters is the length of the shoebox than the width
I forgot what are homophones.Does anyone know what's a homophone.