This project was bootstrapped with Create React App.
A simple weather and forecast app developed with React and the weather data provided by OpenWeatherMap API.
I'm using the browsers geolocation features for detecting user location based on device latitude and longitude then get the weather data from OpenWeatherMap API call. Users can refuse to activate the geolocation feature in their browser. Instead, users can use the search feature. Just type the city name and voila!.
- Demo link : https://react-weather-forecast.netlify.com/
- Clone the repo :
$ git clone https://github.com/mupinnn/react-todo-list.git
. - Install dependencies. Make sure you already have
nodejs
andnpm
oryarn
installed in your system. Use$ npm install or yarn install
. - Create OpenWeatherMap account.
- Check your email or check your account dashboard https://home.openweathermap.org/api_keys.
- Copy your free API key, and create
.env
file in your project root folder. - Write this on your
.env
file :REACT_APP_API_KEY=PASTE YOUR API KEY HERE
- Save it and try it using
npm or yarn start
In the project directory, you can run :
Runs the app in the development mode with npm Open http://localhost:3000 to view it in the browser.
Or
Runs the app in the development mode with yarn Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.