Skip to main content

Contributing Guide

react-native-share uses semantic-release for creating new releases. Also, we follow the commit-lint specification with husky to handle our commit messages.

Commits merged into main are evaluated by semantic-release to determine whether a new version should be published to npm.

Documentation

We use Docusaurus to build our documentation. Everything you need to change the docs is located at ./website. Use Node.js 20 or later and the repository's Corepack-managed Yarn version:

cd website
yarn install --immutable
yarn start

This starts a local Docusaurus server. Run yarn build to check the production site. Documentation is published when changes reach main.

Using the Example App

To run the example app, which is located at ./example, just run at the root project:

yarn install --immutable
yarn patch:example:app
cd example/ios
pod install
cd ../..

And finally a yarn start at the root folder.

After that, open the file example/ios/example.xcworkspace with XCode or run a yarn start:android to start the android simulator.

Why does the example have no package.json?

The example uses the root package.json and node_modules. The root react-native.config.js points the CLI at the example's native projects.

Also, we changed some native files like: AppDelegate.M, MainApplication.java and other files. By doing this, we are able to use the root-version of react-native-share and react at ../../../.

If you want to do something similar on your library, or other project I recommend looking at datetimepicker which was the base to apply this changes.