A modern, feature-rich news application built with React Native and Expo, featuring multiple news categories, dark mode, search functionality, and a clean UI.
- Top Trending News: View the top 5 trending headlines on the home screen
- Multiple Categories: Browse news across 5 categories:
- Business 💼
- Sports ⚽
- Technology 💻
- Entertainment 🎬
- Science 🔬
- Search Functionality: Search for news articles by keyword
- Dark Mode: Toggle between light and dark themes (persisted with AsyncStorage)
- Pull to Refresh: Refresh news lists with pull-down gesture
- Modern UI: Clean, intuitive interface similar to Google News/Inshorts
- Category Badges: Visual indicators showing article categories
- Loading Skeletons: Smooth loading states while fetching data
- Article Details: Full article view with title, image, source, date, and content
- Cross-Platform: Runs on both Android and iOS
[Add screenshots here after testing]
- Node.js (v14 or higher)
- npm or yarn
- Expo CLI (
npm install -g expo-cli) - iOS Simulator (for macOS) or Android Studio (for Android development)
- Expo Go app (for testing on physical devices)
-
Clone the repository (if applicable):
cd newsApp -
Install dependencies:
npm install
-
Get a NewsAPI key:
- Visit NewsAPI.org
- Sign up for a free account
- Copy your API key
-
Configure API key:
- Open
src/constants/news.ts - Replace
YOUR_NEWS_API_KEY_HEREwith your actual API key:
export const NEWS_API_KEY = 'your_actual_api_key_here';
- Open
npm startnpm run androidnpm run iosnpm run web- Install Expo Go on your iOS or Android device
- Scan the QR code shown in the terminal
- The app will load on your device
newsApp/
├── src/
│ ├── components/ # Reusable components
│ │ ├── ArticleCard.tsx
│ │ └── SkeletonLoader.tsx
│ ├── constants/ # App constants and configuration
│ │ ├── news.ts
│ │ └── theme.ts
│ ├── contexts/ # React contexts
│ │ └── ThemeContext.tsx
│ ├── navigation/ # Navigation configuration
│ │ └── AppNavigator.tsx
│ ├── screens/ # App screens
│ │ ├── HomeScreen.tsx
│ │ ├── CategoryScreen.tsx
│ │ ├── BusinessScreen.tsx
│ │ ├── SportsScreen.tsx
│ │ ├── TechnologyScreen.tsx
│ │ ├── EntertainmentScreen.tsx
│ │ ├── ScienceScreen.tsx
│ │ ├── SearchScreen.tsx
│ │ └── ArticleScreen.tsx
│ ├── services/ # API services
│ │ └── newsApi.ts
│ ├── types/ # TypeScript type definitions
│ │ ├── news.ts
│ │ └── navigation.ts
│ └── utils/ # Utility functions
│ └── dateUtils.ts
├── App.tsx # App entry point
├── package.json
└── README.md
- React Native: Mobile app framework
- Expo: Development platform
- TypeScript: Type-safe JavaScript
- React Navigation: Navigation library
- Bottom Tabs Navigator
- Native Stack Navigator
- AsyncStorage: Local data persistence
- Axios: HTTP client for API calls
- NewsAPI: News data source
- Displays top 5 trending news articles
- Dark mode toggle button
- Pull-to-refresh functionality
- Loading skeletons during data fetch
- Dedicated screen for each news category
- Scrollable list of articles
- Pull-to-refresh support
- Category icon in header
- Full article title and image
- Source badge and publication date
- Author information
- Article content preview
- "Read Full Article" button (opens in browser)
- Search input field
- Real-time article search
- Empty state with helpful messages
- Loading indicator during search
- System-wide theme toggle
- Persisted across app restarts
- Smooth theme transitions
- Optimized colors for readability
This app uses NewsAPI.org for fetching news data.
Free Tier Limitations:
- 100 requests per day
- Only works with localhost in development
- Production deployment requires a paid plan
Alternative APIs (if needed):
- Ensure you've replaced
YOUR_NEWS_API_KEY_HEREwith your actual key - Check that your API key is active on NewsAPI.org
- Verify you haven't exceeded the free tier limit (100 requests/day)
- Make sure all dependencies are installed:
npm install - Clear cache:
expo start -c
- Some articles may not have images (fallback placeholder is shown)
- Check your internet connection
- Bookmarking/favorites functionality
- Push notifications for breaking news
- Offline mode with cached articles
- Social sharing features
- Multiple language support
- Custom news sources selection
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
For questions or support, please open an issue in the repository.