Welcome to the setup guide for the BaseCode project. This guide will walk you through the steps required to set up and start working on the project.
- Prerequisites
- Getting Started
- Available Scripts
- Project Structure
- Recommended Development Workflow
- Dependencies
- Additional Notes
Before you begin, ensure that you have the following software installed on your system:
- Node.js: This project requires Node.js version 16 or higher.
- Yarn: Yarn is used as the package manager for this project. Make sure it's installed globally.
- Git: You'll need Git for version control and code collaboration.
- CocoaPods: If you're planning to work with iOS, make sure you have CocoaPods installed (for managing iOS dependencies).
-
Open a terminal or command prompt.
-
Clone the repository to your local machine by running the following command:
git clone http://192.168.4.9/root/boilerplate-react-native.git
-
Navigate to the project directory:
cd RNBaseCode
To install the project dependencies, run the following command:
yarn install
In the project directory, you can run the following scripts:
-
Clean Android Build: Removes Android build artifacts.
yarn clean
-
Run Android: Starts the Android development server and launches the app on an Android emulator or device.
yarn android
-
Build Android: Cleans the Android build artifacts and then runs the Android app.
yarn build-android
-
Clean iOS Build: Removes iOS build artifacts.
yarn clean:ios
-
Run iOS: Starts the iOS development server and launches the app on the specified iOS simulator.
yarn ios
-
Install iOS Dependencies: Installs iOS dependencies using CocoaPods.
yarn ios-pod
-
Build iOS: Installs iOS dependencies and then runs the iOS app.
yarn build-ios
-
Reset Metro Cache: Resets the Metro Bundler's cache.
yarn reset:metro
-
Linting: Runs ESLint for code linting.
yarn lint
-
Lint and Fix: Runs ESLint and attempts to fix linting issues automatically.
yarn lint-fix
-
Start Metro Bundler: Starts the Metro Bundler for running the app.
yarn start
-
Run Tests: Executes the Jest test suite.
yarn test
Describe your project's directory structure here.
-
Start the Metro Bundler:
yarn start
-
Launch the app on the desired platform:
- Android:
yarn android
- iOS:
yarn ios
- Android:
-
Make code changes and see live updates in the running app.
-
Use the provided scripts for cleaning, building, and testing the app.
Here are some of the key dependencies used in this project along with their documentation links:
- @react-navigation/bottom-tabs: Navigational component for creating bottom tab navigation.
- @react-navigation/native: Core library for navigation in React Native apps.
- @react-navigation/native-stack: Stack navigator for handling navigation in a stack-like manner.
- @reduxjs/toolkit: A toolset for efficient Redux development, including simplifying store setup and reducer logic.
- axios: A promise-based HTTP client for making requests to APIs.
- react: JavaScript library for building user interfaces.
- react-native: Framework for building native mobile apps using React.
- react-native-safe-area-context: Provides a way to handle safe area insets.
- react-native-screens: Package for managing native views and screens in React Native navigation.
- react-native-sensitive-info: Library for securely managing sensitive information in React Native apps.
- react-redux: Official React bindings for Redux state management.
- redux-persist: Library for persisting Redux store data to local storage.
- redux-persist-sensitive-storage: Redux persist storage engine for sensitive data.
- For Android development, make sure you have the necessary Android SDK components installed.
- If you encounter issues related to dependencies, try deleting the
node_modules
folder and runningyarn install
again.
Happy coding! If you have any questions or encounter issues, feel free to reach out for assistance.