Weather App react Problem

i am working on a react weather project and i falling in this problem
Can anyone help me out

Hi, I think you should move the call to the weather api inside the callback that you passed to the getCurrentPosition() function. Otherwise you will call the weather api before the state is set to the current coordinates.

Thank you brother… It works