@brightlayer-ui/react-native-template-routing-typescript
v2.2.0
Published
A template with pre-configured routing for React Native projects created with the Brightlayer UI CLI.
Downloads
13
Maintainers
Readme
Routing Template (TypeScript)
This is an official Brightlayer UI template used internally by the Brightlayer UI CLI.
This template includes the installation and initial setup of routing using React Navigation. It includes several placeholder routes/screens and a Drawer navigator from the Brightlayer UI React Native Component Library.
Usage
This template can be used with the Brightlayer UI CLI:
npx -p @brightlayer-ui/cli blui new react-native --name=myapp --cli=rnc --language=ts --template=routing
Project Structure
Projects created using this template will start out with the following file structure:
|── /ios // ios project folder
|── /android // android project folder
|── /assets // fonts and images used by the application
|── App.tsx // app entry point
|── /pages // sample application pages
└── /router
|── index.tsx // sets up routing
└── navigation-drawer.tsx // sets up Drawer
Clear Metro bundler cache (recommended)
Run the command into the root of the created project.
yarn start --reset-cache
Android
This template supports the latest version of the react-native-reanimated package, which needs to reinstall the NDK module from Android Studio. You can do this via Android Studio: Go to Tools -> SDK Manager -> SDK Tools. And Reinstall or install 23.1.7779620
NDK version.
iOS
Make sure to install pods first before running the app.
cd ios && pod install && cd ..