Contributions are always welcome, no matter how large or small!
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. Before contributing, please read the code of conduct.
To get started with the project, run yarn in the root directory to install the required dependencies for both the library and the example app:
yarnWhile developing, you can run the example app to test your changes.
Start the Metro Bundler:
yarn example startRun on Android:
yarn example androidRun on iOS:
yarn example iosNote: Any changes to JavaScript files in src/ are automatically reflected in the example app. Changes to Native Code (Java, Kotlin, ObjC, Swift) require rebuilding the example app.
Before submitting a PR, ensure your code passes all tests and linting checks.
Run Unit Tests:
yarn testRun Type Check:
yarn typecheckRun Linter:
yarn lintFix Linter errors:
yarn lint --fixWe use react-native-builder-bob to build the package.
To check if the package builds correctly:
yarn buildor
yarn prepareCheck the lib/ folder to make sure CommonJS, Module, and TypeScript definitions are generated correctly.
To publish a new version to npm:
- Update the version in
package.json. - Run
npm publish(theprepublishOnlyhook will automatically runbob build).
npm publishWe follow the conventional commits specification for our commit messages:
fix: bug fixes, e.g. fix crash due to deprecated method.feat: new features, e.g. add new method to the module.refactor: code refactor, e.g. migrate from class components to hooks.docs: changes into documentation, e.g. add usage example for the module.test: adding or updating tests, e.g. add integration tests.chore: tooling changes, e.g. change CI config.