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

Draw an angle for each measurement
i NEED HELP ASAP with my science analysis questions !​
is -4,-20,-100,-500,-2500 arithmetic, geometric, or neither?
1. The science club constructed a pyramid with a square base out of paper clips. The height of the pyramid is 2.5 feet. One side of the square measures 2.5 feet
What is 1 3/4 cup • 4
4x² - 3y, when x= 1/2 and y= -5
Wallpaper was applied ti one rectangular wall of a large room. The dimensions are shown below. If the total cost of the wallpaper was $771.12, what was tye cos
What/who is the subject here? The girl who loves to touch the rear of the plane is jailed today.
Can anyone help me please
Un día una mujer sirvienta tuvo la oportunidad de ir a un baile en el castillo del príncipe. Con la ayuda de una madrina mágica, ella se convirtió en una dama