- Fetches mini news JSON objects from a News API.
- Displays the news articles with title, description, image, author, date, and source information.
- Provides a responsive and user-friendly interface.
- Supports navigation to view full news articles.
- React: A JavaScript library for building user interfaces.
- React Router: A library for handling routing in React applications.
- Axios: A promise-based HTTP client for making API requests.
- Bootstrap: A popular CSS framework for building responsive websites.
- HTML: Markup language for creating the structure of the web pages.
- CSS: Styling language for enhancing the presentation of the web pages.
To run the React News App on your local machine, follow these steps:
- Clone the repository:
git clone https://github.com/Teja78906/newsapp.git - Navigate to the project directory:
cd newsapp - Install the dependencies:
npm install - Obtain an API key from the News API provider (e.g., https://newsapi.org/)
- Create a
.envfile in the root directory and add your API key:REACT_APP_API_KEY=your-api-key - Start the development server:
npm start - Open your web browser and visit
http://localhost:3000to see the React News App in action.
You can customize the behavior and appearance of the React News App by modifying the relevant code files:
- Adjust the API endpoints and parameters in the news fetching logic (
src/api/newsApi.js). - Modify the components in the
src/componentsdirectory to change the layout, styling, or additional features. - Update the routing configuration in
src/App.jsto define the routes and associated components. - Customize the CSS styles in
src/stylesto suit your design preferences.
This project is licensed under the MIT License. 97bfed3c9cb7dd26f55e