FeedBack on Show the Local Weather with React Hooks

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:

  1. have to get the geolocation data before passing it to fetch data from the weather URL
  2. 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.
  3. how to set up useContext + useReducer.
  4. how to import and use bootstrap & icons on codepen.
  5. wondering if i can put both of the get geolocation and fetchWeather functions outside the App components.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.