The User Directory App is a React Native application designed to manage user information efficiently. It provides features for viewing a list of users and detailed information about individual users. This app is ideal for learning or implementing the basics of React Native navigation, UI components, and API integration.
- Displays a list of users fetched from a remote API.
- Allows users to view detailed information about a selected user.
- Utilizes modern navigation techniques for seamless transitions between screens.
- Built using Expo for streamlined development and cross-platform compatibility.
-
Create the Project:
- Initialize the React Native project using Expo.
- Set up folders for components, screens, and utilities for better organization.
-
Build Navigation:
- Implement navigation using
react-navigationfor transitioning between screens. - Add
AppNavigator.jsfor managing routes.
- Implement navigation using
-
Design Screens:
- Create
UserListScreen.jsfor displaying a list of users. - Create
UserDetailsScreen.jsfor showing detailed user data.
- Create
-
API Integration:
- Use a remote API to fetch user data.
- Display the data dynamically on the screens.
-
Test Locally:
- Test the app on an Android emulator, iOS simulator, or physical devices using Expo Go.
-
Build:
- Use EAS Build to generate APK or AAB for Android and IPA for iOS.
Follow these steps to set up the project locally:
-
Clone the Repository:
git clone https://github.com/your-username/user-directory-app.git cd user-directory-app -
Install Dependencies: Make sure you have
npmoryarninstalled, then run:npm install # OR yarn install -
Run the Project: Start the development server using Expo:
expo start
- Scan the QR code in the terminal with Expo Go (on Android or iOS).
- Alternatively, press
ato run on an Android emulator orifor an iOS simulator.
-
Environment Setup (if required): Add any API keys or environment variables needed for the app to function in a
.envfile.
To generate an APK for the app:
-
Install EAS CLI:
npm install -g eas-cli
-
Login to Expo:
eas login
-
Configure the Build: Ensure
eas.jsonis properly configured:{ "cli": { "version": ">= 3.0.0" }, "build": { "production": { "android": { "buildType": "apk" } } } } -
Start the Build:
eas build -p android --profile production
-
Download the APK: Once the build is complete, download the APK from the link provided by Expo or the EAS dashboard.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature/bug fix.
- Commit your changes.
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.