React Native template for a quick start with TypeScript and CosmJS.
This template is based on:
We made this repo to solve the following issue:
This was made possible thanks to the 0.70.0 release of React Native, which solved the compatibility problems related to BigInt:
- React Native >= 0.70.0
- Ruby >= 3.1.0
- Gradle >= 7.5.1
- Elegant usage directly within the React Native CLI
- Consistent with the default React Native template
- Minimal additional dependencies
- Default setup for CosmJS compatibility
- Use RN CLI and clone the project
npx react-native init MyApp --template https://github.com/nabla-studio/react-native-template-cosmjs
- Go to the project directory
cd MyApp
- Install dependencies
yarn setup
- a. Start the iOS server
yarn ios
- b. Start the Android server
yarn android
On macOS you may encounter some problems for the iOS build, to fix it follow the steps below:
- Go to iOS directory
cd ios
- Deintegrate pod installation
pod deintegrate
- Reinstall pod dependencies
pod install
This template only works with the new CLI. Make sure you have uninstalled the legacy react-native-cli
first (npm uninstall -g react-native-cli
) for the below command to work. If you wish to not use npx
, you can also install the new CLI globally (npm i -g @react-native-community/cli
or yarn global add @react-native-community/cli
).
If you tried the above and still get the react-native-template-cosmjs: Not found error, please try adding the --ignore-existing
flag to force npx to ignore any locally installed versions of the CLI and use the latest.
Further information can be found here: https://github.com/react-native-community/cli#about
Contributions are very welcome. Please check out the contributing document.
For support or suggestions, you can create a new issue
The template was tested on:
- MacBook pro (13-inch, M1, 2020) - macOS Monterey 12.2.1
- MacBook pro (13-inch, M1, 2020) - macOS Monterey 12.6
Versions of iOS tested:
- 16.0
- 15.4
- 14.0.1
Version of Android tested:
- API 33
Copyright © 2022 nabla
This project is licensed by MIT License.