This application consists of a login screen and a posts screen where users can view posts fetched from an API.
- Login Screen: Basic authentication using a hardcoded username (testuser) and password (password).
- Posts Screen: Displays a list of posts obtained from JSONPlaceholder API.
- Details Screen: Shows full details of a selected post.
- Refresh Button: Fetches and updates the list of posts.
- Pull-to-refresh: Allows users to pull down to refresh posts.
- Pagination: Enables loading more posts as users scroll down the list.
- Error Handling: Displays an error message if data cannot be fetched.
-
Clone the repository:
git clone https://github.com/jerish-balakrishnan/ReactNativePostsApp.git
-
Navigate to the project directory:
cd ReactNativePostsApp
-
Install dependencies:
npm install
-
With Expo:
expo start
-
With React Native CLI:
react-native run-ios # for iOS react-native run-android # for Android
Run the unit tests with:
npm test
- JSONPlaceholder for providing the API endpoint.