News App
A React-based web application for fetching and displaying news articles from various categories using the News API.
Table of Contents
Introduction
This project is a simple news app built with React that allows users to explore news articles based on different categories like Technology, Health, Science, Business, Sports, and Entertainment. The app fetches real-time data from the News API and displays it in an organized and user-friendly manner.
Features
- Select news categories from the navigation bar.
- Fetch and display latest news articles based on the selected category.
- View individual news items with titles, images, descriptions, and "Read More" links.
Project Structure
App Component (App.js):
- Sets up the main structure of the React app.
- Manages the selected news category through state (category).
- Renders the Navbar and NewsBoard components.
Navbar Component (Navbar.js):
- Displays the navigation bar with news categories.
- Allows users to select a category, updating the state in the App component.
- Includes a menu icon for mobile responsiveness.
NewsBoard Component (NewsBoard.js):
- Fetches news articles based on the selected category.
- Displays the fetched news articles along with date and time.
Newsitem Component (Newsitem.js):
- Represents an individual news item.
- Displays the news title, image, description, and a "Read More" link.
Running the App:
- The app is set up using create-react-app and utilizes the development server.
- The npm start command launches the app, and it can be accessed in a web browser at http://localhost:3000.
Enhancements:
- The project can be extended by adding more features, refining the UI, or incorporating additional news sources.
- Error handling and loading indicators can be implemented for a better user experience.
Dependencies:
- The project uses React, Tailwind CSS, and the News API for fetching news data.
Getting Started
To get a local copy up and running, follow these simple steps:
- Clone the repository:
```sh
git clone https://github.com/your-username/news-app.git