This is a React application that fetches and displays news articles using the News API. The application allows users to browse through different categories of news and read articles from various sources.
- Clone this repository to your local machine.
git clone https://github.com/jaspinderkohli/news-app.git
- Navigate to the project directory.
cd news-app
- Install dependencies using npm or yarn.
npm install # or yarn install
- Obtain an API key from News API.
- Create a
.env
file in the root directory of the project. - Add your API key to the
.env
file.REACT_APP_NEWS_API_KEY=your-api-key-goes-here
- Start the development server.
npm start # or yarn start
- Open your browser and navigate to
http://localhost:3000
to view the application.
- Browse news articles by different categories such as business, entertainment, health, science, sports, technology, etc.
- View articles from various news sources.
- Click on an article to read the full content on the source website.
- Responsive design for seamless usage on different devices.
- React
- Axios (for making HTTP requests)
- React Router (for routing)
- Bootstrap (for styling)
Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please open an issue or create a pull request.