The News App is a simple web application that fetches and displays news articles from the News API. If the API request fails, it shows an alert error message to the user. The application is built using React, Vite, and Tailwind CSS for a modern, efficient, and responsive user interface.
- Fetch News: The app fetches the latest news articles from the News API.
- Display News: The articles are displayed in a card layout, showing the author, publication date, title, and a link to read more.
- Error Handling: If the API request fails, an alert is shown to the user informing them of the failure.
- React: A JavaScript library for building user interfaces.
- Vite: A build tool that provides a faster and leaner development experience for modern web projects.
- Tailwind CSS: A utility-first CSS framework for rapidly building custom designs.
-
Clone the Repository:
git clone https://github.com/MSubham2003/News-App cd News-App -
Install Dependencies:
npm install
-
Run the App:
npm run dev
The app will be available at
http://localhost:5173.
To build the app for production, run:
npm run build