This is a React application that leverages the News API to fetch and display news articles across various categories. Users can browse through different news topics and read detailed information about each article.
- Fetches news articles from the News API.
- Allows users to browse news articles by categories such as business, entertainment, health, science, sports, technology, etc.
- Provides detailed information about each article including title, description, source, and publication date.
- Simple and intuitive user interface.
- React
- Axios (for making HTTP requests)
- Bootstrap (for styling)
-
Get API Key: Sign up for an account on News API to obtain an API key.
-
Clone the repository:
git clone https://github.com/yourusername/react-news-app.git
-
Install dependencies:
cd react-news-app npm install
-
Enter API Key: Replace
'YOUR_API_KEY'
in theNews.js
file with your actual News API key. -
Run the application:
npm start
-
Open your browser and visit
http://localhost:3000
to view the application.
- Browse through different categories of news by clicking on the respective tabs (e.g., business, entertainment, health, science, sports, technology).
- Click on any news article to view more details about it.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-feature
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/new-feature
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- This project was inspired by the need for a simple, yet functional news application using React.
- Thanks to the developers of News API for providing access to their service.