Skip to content

Webpage built using ReactJS ,that displays weather of any city around globe.

Notifications You must be signed in to change notification settings

vishwasholla/weather_app_using_react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather App

This is a weather app that allows users to search for a city and see the current weather conditions.

Getting Started

To get started, clone the repository and install the dependencies.

git clone https://github.com/vishwasholla/weather-app.git
cd weather-app
npm install

Running the App

To run the app, simply run the following command:

npm start

The app will then be available at http://localhost:3000.

Code Explanation

The code for this app is located in the src directory. The main component is the App component, which is located at src/App.js. This component is responsible for rendering the search bar and the current weather conditions.

The search bar is implemented using the react-select-async-paginate library. This library provides a simple way to create an asynchronous search bar. The search bar is connected to the onSearchChange function, which is passed to the Search component.

The onSearchChange function is responsible for fetching the current weather conditions for the city that the user has selected. The function uses the fetch API to make a request to the OpenWeatherMap API. The response from the API is then parsed and passed to the CurrentWeather component.

The CurrentWeather component is responsible for rendering the current weather conditions for the city that the user has selected. The component uses the data that is passed to it from the onSearchChange function to render the weather conditions.

Deployment

To deploy the app, you can use a service like Heroku or Netlify. Heroku and Netlify both provide a simple way to deploy a React app.

Once you have deployed the app, you can share the URL with your users.

Conclusion

This weather app is a simple but powerful example of how to use React to create a user interface. The app is easy to use and understand, and it can be easily customized to meet your needs.

About

Webpage built using ReactJS ,that displays weather of any city around globe.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published