📱 A template for your next React Native project 🚀, Made with developer experience and performance first: TypeScript, Husky, Lint-Staged, react-navigation, react-query, restyle, react-hook-form, AppIcon, Splash Screen.
🚀 Use the template to start your next project or navigate to code source to get some inspiration 😉
Start your project using obytes template by running:
npx react-native init MyApp --template https://github.com/obytes/react-native-template-obytes
Open the project on your favorite IDE (vscode 😉)
src
├── api #axios client and api hooks using react-query
│ ├── APIProvider.tsx
│ ├── client.tsx
│ ├── index.tsx
│ ├── useAddTask.tsx
│ └── useTasks.tsx
├── core # core functionalities:authentication, storage, localization
│ ├── Auth
│ ├── I18n
│ └── index.tsx
├── index.tsx
├── navigation # Navigation, stacks and tabs
│ ├── AuthNavigator.tsx
│ ├── RootNavigator.tsx
│ ├── TabNavigator.tsx
│ ├── index.tsx
│ ├── types.tsx
│ └── utils.tsx
├── screens # App screens
│ ├── Home
│ ├── Login
│ ├── Style
│ └── index.tsx
├── translations # translation files
│ └── en.json
└── ui # ui component with theming
├── Button.tsx
├── ErrorHandler
├── Input.tsx
├── Pressable.tsx
├── SafeAreaView.tsx
├── Screen.tsx
├── Text.tsx
├── View.tsx
├── constants.tsx
├── icons
├── index.tsx
├── theme
└── utils.tsx
Enable husky Git pre-hooks by adding the following script to your packages.json
and reinstall dependencies to enable husky pre-commit using yarn install
"scripts": {
"postinstall": "husky install",
},
Replace App logo template logo.png
with your logo under assets
folder
Run the following command to generate App icons assets :
yarn react-native set-icon --path ./assets/logo.png --background "#FFF"
For android icon, make sure to provide a logo with more padding and generate a new app icon for android :
yarn react-native set-icon --platform android --path ./assets/android_logo.png --background "#FFF"
To generate a standard splash screen using bootsplash package.
yarn react-native generate-bootsplash assets/logo.png \
--background-color=FFFFFF \
--logo-width=150 \
--assets-path=assets
Replace Inter.ttf
font file with your fonts under assets/fonts
folder
Run the following command to generate App icons assets :
yarn react-native link
More details how to customize App Icon and Splash screen
👉 https://handbook.obytes.com/docs/mobile/get-started
👉 https://handbook.obytes.com/docs/mobile/ci-cd/github-action-build
This project is MIT licensed.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。