Welcome to the World News App, a React Native application built using Expo, designed to fetch real-time news from the NewsData.io API. The app provides users with a smooth and interactive experience, utilizing advanced animations and intuitive navigation.
β Fetch the latest news from multiple sources. β Smooth animations with React Native Reanimated. β Stores user preferences with Async Storage. β Optimized mobile UI with native styling. β Efficient API request handling with Axios Retry. β Styled using Expo Linear Gradient.
- Framework: React Native
- Navigation: React Navigation
- Animations: React Native Reanimated
- State Management: React Hooks
- Networking: Axios
- Async Storage: React Native Async Storage
- Date & Time Formatting: Moment.js
- Styling: Native CSS with Expo
Follow these steps to set up the app:
https://github.com/ApsaraWitharana/AMD-CW-World-News-App.git
npm install
Create a .env
file and add your API key:
API_KEY=your_api_key_here
Start the development server:
npx expo start
- Browse different news categories.
- Tap on an article to read full details.
- Enjoy smooth transitions and animations.
import axios from 'axios';
import { useEffect, useState } from 'react';
import { API_KEY } from '@env';
const fetchNews = async () => {
try {
const response = await axios.get(`https://newsdata.io/api/1/news?apikey=${API_KEY}`);
return response.data.results;
} catch (error) {
console.error('Error fetching news:', error);
}
};
export default fetchNews;
This project is licensed under the MIT License. See the LICENSE file for details.
For inquiries or collaboration:
- Author: Sachini Apsara
β Feel free to contribute, star the repo, and explore more!