Skip to content

A React web application that fetches and displays the latest news from various categories and countries using the GNews API. Features responsive design and smooth navigation.

Notifications You must be signed in to change notification settings

psaikeshav/NewsApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NewsApp

Netlify Status

Screenshot 2024-10-15 at 11 31 23 PM

Overview

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.

Features

  • 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.

Technologies Used

  • 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.

Installation

  1. Clone the repository:

    git clone https://github.com/psaikeshav/NewsApp.git
    cd NewsApp
  2. Install the dependencies:

    npm install
  3. Create a .env file in the root directory and add your GNews API key:

    API_KEY=your_api_key_here
  4. Start the development server:

    npm start

Usage

  • 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.

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

Acknowledgements

Contact

For any inquiries or feedback, please contact me at LinkedIn.

About

A React web application that fetches and displays the latest news from various categories and countries using the GNews API. Features responsive design and smooth navigation.

Topics

Resources

Stars

Watchers

Forks