An elegant Toast solution for react-native apps. Built using Typescript, hooks and context with multiplatform support: Android, iOS, Expo, MacOS and Windows.
Check out the docs here for installation and usage instructions
Pull requests are always welcome โค๏ธ
Follow these steps to set up the project locally and contribute:
- Clone the repository
git clone https://github.com/mcodex/react-native-rooster.git
cd react-native-rooster
- Install dependencies
yarn install # install library dependencies
cd example && yarn install # install example app dependencies
- Run the example app
cd example
yarn start # start Metro bundler
yarn ios # run on iOS simulator (or yarn android)
- Build the library
cd react-native-rooster
yarn build # compile TypeScript and bundle with Rollup
4.1 Use yalc for local integration testing Install yalc globally if you haven't already:
npm install -g yalc # or yarn global add yalc
Publish the freshly built package:
yalc publish # pushes lib to local yalc store
Link into the example app:
cd example
yalc add react-native-rooster # installs the local package
yarn install # ensure dependencies are up to date
Now run the example to verify changes:
yarn start # start Metro bundler
yarn ios || yarn android # launch on simulator/device
- Run tests and lint
yarn test # run Jest unit tests
yarn lint # run ESLint
- Release process
- Bump version in
package.json
- Commit changes and create a Git tag
- Push to GitHub; CI will publish to npm on merge
Make sure to follow existing code style and add tests for new features.