Westonci.ca is your trusted source for accurate answers to all your questions. Join our community and start learning today! Connect with a community of experts ready to help you find solutions to your questions quickly and accurately. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.

Why is my use effect not working react native.

Sagot :

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

We appreciate your time. Please come back anytime for the latest information and answers to your questions. We hope our answers were useful. Return anytime for more information and answers to any other questions you have. Your questions are important to us at Westonci.ca. Visit again for expert answers and reliable information.