This project was development by Amela Technology
Below you'll find information about performing common tasks.
...
- Easy to start
- React native version 0.61.5
- Fully using typescript for typing
- Folder structs using package-by-feature (why)
- Redux, redux-saga, redux-persist, redux-logger
- React navigation v4 (we have plan for upgrade to v5 when release)
- 100% functional component with hook
- Alot of custom components
- i18next for multiple language
- Custom hooks for share state logic between components
- Eslint using prettier plugin for checking code convention
- Husky for pre-commit (we check lint have no errors first when commit)
-
Clone this repo,
git clone https://github.com/amela-technology/react-native-templet-v1.git <your project name> -
Go to project's root directory,
cd <your project name> -
Remove
.gitfolder,rm -rf .git -
Open
package.jsonand change thenameproperty with your project name -
Open
app.jsonand replace'ReactNativeBase'by your project name -
Remove to line 35, 36
android&iosin.gitignore -
Run
yarnornpm installto install dependencies -
Run
npm run init-projectto create iOS & Android Folders. -
Run your project with
npm run androidornpm run ios
If Yarn was installed when the project was initialized, then dependencies will have been installed via Yarn, and you should probably use it to run these commands as well. Unlike dependency installation, command running syntax is identical for Yarn and NPM at the time of this writing.
Runs your app in development mode.
npm start --reset-cache
# or
yarn start --reset-cache
Runs the jest test runner on your tests.
Like npm start, but also attempts to open your app in the iOS Simulator if you're on a Mac and have it installed.
Like npm start, but also attempts to open your app on a connected Android device or emulator. Requires an installation of Android build tools (see React Native docs for detailed setup). We also recommend installing Genymotion as your Android emulator.
Run linter check source code
Run linter fix source code
Link assets and font from src/assets to Native project
.
├── App.tsx
├── AppContext.tsx
├── assets
│ ├── fonts
│ │ ├── Montserrat-Light.ttf
│ │ ├── Montserrat-Regular.ttf
│ │ └── Montserrat-SemiBold.ttf
│ ├── images
│ ├── images.ts
│ ├── locates
│ │ ├── en.ts
│ │ └── jp.ts
│ ├── metrics.ts
│ ├── sizes.ts
│ └── themes.ts
├── feature
│ ├── home
│ │ ├── HomeView.tsx
│ │ ├── components
│ │ │ └── HomeTabs.tsx
│ │ ├── redux
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ ├── saga.ts
│ │ │ └── types.ts
│ │ └── styles.ts
│ ├── login
│ │ ├── LoginView.tsx
│ │ ├── components
│ │ │ └── Logo.tsx
│ │ ├── redux
│ │ │ ├── actions.ts
│ │ │ ├── reducer.ts
│ │ │ ├── saga.ts
│ │ │ └── types.ts
│ │ └── styles.ts
│ └── splash
│ └── SplashView.tsx
├── services
│ ├── api
│ │ ├── AuthApi.ts
│ │ ├── CommentApi.ts
│ │ ├── UserApi.ts
│ │ └── config
│ │ ├── request.ts
│ │ └── urls.ts
│ └── navigation
│ ├── NavigationHelpers.ts
│ ├── NavigationService.ts
│ └── config
│ ├── AppContainer.ts
│ ├── routes.ts
│ └── transition.ts
├── shared
│ ├── components
│ │ └── base
│ │ ├── StyledButton.tsx
│ │ ├── StyledImage.tsx
│ │ ├── StyledInput.tsx
│ │ ├── StyledList.tsx
│ │ ├── StyledNoData.tsx
│ │ ├── StyledText.tsx
│ │ ├── StyledTouchable.tsx
│ │ └── index.ts
│ ├── hooks
│ │ ├── NavigationHooks.ts
│ │ ├── useApi.ts
│ │ ├── useInfinityScroll.ts
│ │ └── useInput.ts
│ ├── store
│ │ ├── rootReducer.ts
│ │ ├── rootSaga.ts
│ │ └── store.ts
│ └── utilities
│ ├── helper.ts
│ └── i18next.ts
└── types
└── typing.d.ts
24 directories, 54 files