👍🎉 First off, thanks for taking the time to contribute! 🎉👍
When contributing to this repository, please first discuss the change you wish to make via issue before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
- Ensure that nothing gets broken. You can use the sample project for that
- Use prettier before committing (
npm run prettier
) - When solving a bug, please provide the steps to reproduce it (codesandbox is our best friend for that)
- Keep it chill 👌
- Node:
>=16.0.0
- npm or yarn
Clone the repository and create a local branch:
git clone https://github.com/zahidalidev/toastify-react-native.git
cd toastify-react-native
git checkout -b my-branch
Install dependencies:
npm install
The library doesn't use a state management library like Redux or MobX to dispatch notifications. Instead, it uses a singleton pattern with refs.
We've included a sample project to help you test your changes in a real React Native environment:
-
First, install the dependencies for the main package:
npm install
-
Navigate to the sample project directory:
cd sample
-
Install the sample project dependencies:
npm install
-
Start the sample project:
npm start
-
Use Expo to run the app on your device or simulator:
# For iOS npm run ios # For Android npm run android
The sample project is set up to use the local version of toastify-react-native, so any changes you make to the library code will be reflected in the sample app (If not try reloading it).
/components
: Contains all the toast components/utils
: Helper functions, interfaces, and default configurations/config
: Theme and styling configurationsindex.ts
: Main entry point for the package
The sample project in the /sample
directory lets you test your changes in a real React Native environment. It's a great way to verify that your changes work as expected before submitting a pull request.
- Make your changes to the library code
- Test your changes using the sample project
- Run prettier to format your code:
npm run prettier
- Commit your changes with a descriptive commit message
- Push your changes to your fork
- Submit a pull request
By contributing, you agree that your contributions will be licensed under its MIT License.