Welcome to the News App! This application allows you to stay updated with the latest news articles across various categories. The app is built with React and fetches news data using the News API.
- Browse news articles from various categories.
- Real-time data fetching from the News API.
- Responsive design for a seamless experience on mobile and desktop devices.
- Easy to navigate and user-friendly interface.
Before you begin, ensure you have met the following requirements:
- Node.js (version 14.x or later)
- npm (Node Package Manager) or yarn
Clone the repository to your local machine using the following command:
git clone https://github.com/thegeek36/News-app-react.git
Navigate to the project directory:
cd News-app-react
Install the necessary dependencies using npm or yarn:
npm install
or
yarn install
To start the application, run the following command:
npm start
or
yarn start
This will start the development server, and you can view the application in your browser at http://localhost:3000
.
The app uses the News API to fetch news articles. To ensure the app works properly, you need to provide your own API key. Follow these steps to update the API key:
-
Open the
Stories.js
file located in thesrc
directory of the project. -
Find the variable where the API key is stored. It should look something like this:
const API_KEY = 'your_api_key_here';
-
Replace the placeholder with your actual API key from News API:
const API_KEY = 'your_actual_api_key';
-
Save the file after making the change.
Note: If the application is running, you need to restart it for the changes to take effect.
Contributions are always welcome! Here’s how you can help:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Make your changes.
- Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a Pull Request.
Thank you for using the News App! If you have any questions or feedback, feel free to reach out. Enjoy exploring the latest news!