Maintainer Le Anh Duc[email protected]
Features
- React-Native-Dom (RND) & React-Native-Web (RNW)
- i18next for multi languages + localization
- Typescript
- React-Navigation
- Apollo + GraphQL
- Formik
git clone http://github.com/anhdle14/rn-boilerplate.git
cd rn-boilerplate
npm install -g react-native-cli react-devtools
npm install
{
"name": "${nameOfYourAppHere}",
"displayName": "${displayNameOfYourAppHere}"
}
{
"name": "${nameOfYourAppHere}",
}
react-native eject react-native upgrade react-native link
$EDITOR android/app/build.gradle
defaultConfig {
minSdkVersion 18
...
}
npm run native:start # For Packager & Metro Bundler
npm run native:ios # For MacOS, iPhone Simulator
npm run native:android # For Android Simulator
Use Formik for forms
Quick Start
// Formik x React Native example + Typescript
import * as React from "react";
import { Button, TextInput, View } from "react-native";
import { Formik } from "formik";
interface IProps {
handleChange: (value: string) => void;
handleBlur: (value: string) => void;
handleSubmit: () => void;
}
export const MyReactNativeForm = (props: IProps) => (
<Formik
initialValues={{ email: "" }}
onSubmit={values => console.log(values)}
>
{props => (
<View>
<TextInput
onChangeText={props.handleChange("email")}
onBlur={props.handleBlur("email")}
value={props.values.email}
/>
<Button onPress={props.handleSubmit} title="Submit" />
</View>
)}
</Formik>
);
Recommend using React Native Paper
Recommend using react-native-vector-icons
Using Apollo Client + GraphQL (Update...)
Popularly known within the design world, Atomic Design helps to build consistent, solid and reusable design systems. Plus, in the world of React, Vue and frameworks that stimulate the componentization, Atomic Design is used unconsciously; but when used in the right way, it becomes a powerful ally for developers.
Follow Airbnb guidelines Here
[Domain]|[Page/Context]|ComponentName|[Type][] is optionals
To use with Atomic Design => [Level5][level4]ComponentName
[Level3]
# tree ./src
./src
├── libs
│ ├── components
│ │ ├── atoms # Level 1
│ │ ├── molecules # Level 2
│ │ └── organisms # Level 3
│ │ └── templates # Level 4
│ ├── screens # Level 5
│ └── services # All other libs
│ ├── apollo
│ ├── i18n
│ └── routes
└── resources # Resource Assets
└── images
- vincentriemer [email protected] - react-native-dom