Skip to content

mahmoodalisha/NewsInShorts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My React application that fetches and displays the latest news from various categories. Users can view news articles categorized into General, Business, Technology, Sports, and Entertainment. The application features a stylish navbar with category buttons and a news feed that updates based on the selected category.

Screenshot 2024-08-23 023502

Screenshot 2024-08-23 023517

Screenshot 2024-08-23 023537

Category-wise News: Fetch and display news articles from different categories. Responsive Design: Modern and attractive user interface with a deep blue navbar and styled buttons. Latest News: Retrieves and shows the latest headlines from NewsAPI. Technologies Used Frontend: React.js Styling: CSS API: NewsAPI (for fetching news articles) Setup Clone the Repository

git clone https://github.com/mahmoodalisha/NewsInShorts.git Navigate to the Project Directory

Configure API Key

Replace YOUR_API_KEY in the NewsFeed.js file with your actual NewsAPI key.

const response = await axios.get( https://newsapi.org/v2/top-headlines?country=in&category=${category}&pageSize=5&apiKey=YOUR_API_KEY ); Run the Application

npm start The application will start and be accessible at http://localhost:3000.

Usage Navbar: Use the category buttons to filter news articles by category. News Feed: View the latest headlines and details for the selected category.

Contributing If you'd like to contribute to this project, please fork the repository and submit a pull request with your proposed changes.

License This project is licensed under the MIT License - see the LICENSE file for details.

Contact For any inquiries, please contact Alisha.