This is a simple React application built with Vite that fetches news data from the NewsAPI. It allows users to browse through the latest news articles and read their summaries.
- Fetches news articles from the NewsAPI
- Displays a list of articles with titles, descriptions, and sources
- Allows users to click on individual articles to read their full content
- Responsive design for optimal viewing on different devices
- React.js
- Vite
- NewsAPI
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/react-news-app.git -
Install dependencies:
npm install -
Create a .env file in the root directory of the project and add your NewsAPI key:
VITE_NEWS_API_KEY=your-newsapi-keyReplace your newsapi-key with your actual NewsAPI key.
-
Start the development server:
npm run dev -
Open your browser and navigate to
http://localhost:3000to view the app.
- Upon opening the app, you will see a list of the latest news articles.
- Click on an article to read its full content.
- Use the navigation buttons to browse through different pages of articles.
- The app is responsive, so you can view it on various devices.
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

