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

Is the molecule saturated or unsaturated
Please anwser ASAP, question below
How do bad and good ozone form
What is the domain of y = cos(2x)? A. [-2, 2] B. [0, 0) OC. (-0,00) D. [0, 1]
Please Help Me!!1. What does the expression “metals eating each other” as used by the electrician refer to? Explain and give an example.2. What are the possible
Why patriarch is blamed for gender inequality in Ghana
can someone help please
Help!!!!! Which of the following would NOT characterize allopatric selection? A physical barrier within population. B. extensive gene flow. C. chromosomal chang
|-26 |+|-19] - [13] = =|口
7. Which nation has been a model of democracy with fair and open elections?