2020.05.22: Show the Temperature at a Fixed Location
First attempt to create a Weather App from an API. Learned to iterate through a list. Had trouble figuring out passing data between components, so I made the
map() functions happen inside the same component. I also used
useState() to update the initial weather variable with the temperature list.
It's functional, but not very usable without time stamps or additional styling.
- Looked at two weather APIs Open Weather and National Weather Service
- setState was freezing up the console. because it kept on calling the API and logging to the console.
fetch()to pull weather data
map()List and Keys
- Called another a function inside
- Understanding the difference between function and class components
- How do I pass the output from a function to another component? Not sure if this is the right solution. It suggests to call a function and save the returned value to a variable