Hi,
Show your location temperature app
i just finished this ‘take home project’ with React hooks(useContext, useReducer, useEffect), React-bootstrap, and React-icons.
Doing this project is challenging for me as i’m beginner. useContext+useReducer makes using state all around much more convenient. Hope i can get some feedback.
here is the challenge parts:
- have to get the geolocation data before passing it to fetch data from the weather URL
- how to prevent from running a function until the param is ready. coz react will render 2 times, if the 1st time failed, it won’t do the 2nd time to fetch from url. it return error and stuck.
- how to set up useContext + useReducer.
- how to import and use bootstrap & icons on codepen.
- wondering if i can put both of the get geolocation and fetchWeather functions outside the App components.