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

Which does a traditional camera need in order to capture images
can someone help pleasee....
i need help on doing the equal values method. Please tell me how to do y=11-2x y=x+2
What is software ownership
who else loves p!atd
Match each component of biodiversity to the example of how it contributes to ecosystem stability. genetic diversity ecosystem diversity species diversity
the acceleration of a freely falling body is about 10m/sec/sec. if the ball is dropped from the top of a building what would its velocity be after 2 seconds?
Atomic mass of hydrogen
What’s the correct answer
The Republican free labor ideology: A. won Republicans significant support from non-slaveholders in the South in 1856. B. owed its origins to Abraham Lincol