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

Please help!! Fill in the blank.
what is a canvas bellying breeze
Karl Popper, a 20th-century philosopher, claimed that genuine scientific theories are __________
Please help me with number 19
Urgent help me with my math!!!!!!!! answer 1-4 correctly for brainliest answer!!!!!!!!! 70POINTS!!!!! URGENT HELP!!!!
How are you supposed to find an answer in simplest form?
Which best explains the motivation behind Ismene's refusal to assist Antigone in burying Polyneices?
Someone please help me
5, red, 4 white, 3 blue balls. 3 drawn and replaced
A lake that is protected from receiving the runoff from a cultivated field is likely to remain a healthy ecosystem. Please select the best answer from the ch