A real-time news platform built using React.js, HTML, and CSS, designed to fetch and display news articles across multiple categories. The website integrates the NewsAPI to provide users with up-to-date news while ensuring fast performance with optimized state management.
- Real-Time News: Fetches and displays the latest news articles dynamically.
- Category-Specific Content: Users can browse news across 7 different categories.
- Optimized Performance: Uses React's state management to reduce loading times.
- Modular Component Architecture: Ensures easy maintenance and scalability.
- Responsive Design: Styled with Bootstrap for seamless viewing on all devices.
- Frontend: React.js, HTML, CSS
- Styling: Bootstrap
- API: NewsAPI (for fetching real-time news articles)
- State Management: React Hooks
- Clone the repository:
git clone https://github.com/your-username/NEWS-WEBSITE.git
- Navigate to the project directory:
cd NEWS-WEBSITE - Install dependencies:
npm install
- Create a
.envfile and add your NewsAPI key:REACT_APP_NEWS_API_KEY=your_news_api_key_here
- Start the development server:
npm start
- Open
http://localhost:3000/in your browser.
- The application fetches 20 news articles per category using the NewsAPI.
- Ensure you have a valid API key from NewsAPI.org to access live news data.
Contributions are welcome! If you’d like to improve this project:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit your changes (
git commit -m "Add new feature"). - Push to the branch (
git push origin feature-branch). - Open a Pull Request.