![Screenshot 2024-10-15 at 11 31 23 PM](https://private-user-images.githubusercontent.com/98534285/376734593-dc23a0c3-b7bf-4cf9-893c-33d0efacbc7c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzE4NzgsIm5iZiI6MTczOTUzMTU3OCwicGF0aCI6Ii85ODUzNDI4NS8zNzY3MzQ1OTMtZGMyM2EwYzMtYjdiZi00Y2Y5LTg5M2MtMzNkMGVmYWNiYzdjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDExMTI1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVlZDU5Y2NiOTIzNWRlNDU4MzM2YjQ0ZDI5NjU3NjViYzhmNDI5ZGZjZTY3OTU2NzdiNDkyMTNkNDZjZGFiOTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.hTqXhmpsDEgAIuMobRrCvdEWPWbB3g4bF9Rbhvj_tZM)
NewsApp is a modern web application built using React.js that allows users to read the latest news from various categories and countries. The app fetches news articles from the GNews API and displays them in a user-friendly interface. Users can easily navigate through different news categories such as sports, technology, entertainment, health, and more.
- Responsive Design: The app is fully responsive and works seamlessly on all devices, including desktops, tablets, and mobile phones.
- Category-Based News: Users can browse news articles based on different categories.
- Country-Specific News: Users can select their country to get news specific to their region.
- Real-Time Updates: The app fetches the latest news articles in real-time using the GNews API.
- Smooth Navigation: The app uses React Router for smooth navigation between different pages.
- Social Media Integration: The app includes social media links for easy sharing of news articles.
- Loading Indicators: The app displays loading indicators while fetching news articles to enhance user experience.
- React.js: A JavaScript library for building user interfaces.
- Axios: A promise-based HTTP client for making API requests.
- React Router: A library for routing in React applications.
- React Icons: A library for including popular icons in React projects.
- Moment.js: A library for parsing, validating, manipulating, and formatting dates.
- GNews API: A news API for fetching the latest news articles.
-
Clone the repository:
git clone https://github.com/psaikeshav/NewsApp.git cd NewsApp
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory and add your GNews API key:API_KEY=your_api_key_here
-
Start the development server:
npm start
- Open your browser and navigate to
http://localhost:3000
to view the app. - Use the navigation bar to switch between different news categories.
- Select your country from the dropdown to get country-specific news.
- Click on the "Read more" button to read the full article on the source website.
Contributions are welcome! Please fork the repository and create a pull request with your changes.
- GNews API for providing the news articles.
- React Icons for the icons used in the app.
- Moment.js for date formatting.
For any inquiries or feedback, please contact me at LinkedIn.