This web app displays variety of weather details about a given city.
Some of its features are:
- Current weather data such as current temperature, feels like temperature, visibility, wind speed, and direction
- 10 day forecast data which can be selected to reveal hourly weather data for each day
- Weather Icons that change according to weather condition
- Toggle between SI and Imperial units easily
- Search suggestions based on a given city name
- Horizontal scroll and button scroll
Open Meteo API is used to retrieve weather data as well as city names
- Live Site URL: React Weather App
- Semantic HTML5 markup
- React
- Tailwind CSS
- Mobile-first workflow
- Third Party API (Open Meteo)
I learned how to use React's useRef hook to detect the scrollWidth changes in a window.
I learned how to use React's useEffect hook to perform side effects such as fetching third party data using the browser's built in fetch API. I also learned about creating a debouncing function to reduce the total number of API calls.
I learned how to use Tailwind CSS to styles the various React Components easily.
First clone this repo using git clone [this repo]
Next, run npm install
or yarn
or pnpm install
to install all the required node packages
You may delete the pnpm-lock.yaml file if you are using yarn or npm
Next, run npm run dev
or pnpm run dev
or yarn run dev
to create a local dev environment