Installation
React Native Bread requires React Native 0.76+ and several peer dependencies for animations, gestures, and safe area handling.Install the package
Install peer dependencies
React Native Bread requires the following peer dependencies:| Package | Version | Purpose |
|---|---|---|
| react-native-reanimated | ≥ 4.1.0 | Smooth 60fps animations |
| react-native-gesture-handler | ≥ 2.25.0 | Swipe-to-dismiss gestures |
| react-native-safe-area-context | ≥ 5.0.0 | Safe area handling |
| react-native-screens | ≥ 4.0.0 | Native screen primitives |
| react-native-svg | ≥ 15.8.0 | Default toast icons |
| react-native-worklets | ≥ 0.5.0 | Worklet support for Reanimated |
Most React Native projects already have many of these dependencies installed. Check your
package.json before installing.Install all peer dependencies
Version compatibility
If you encounter version conflicts, check the Reanimated compatibility guide for your specific React Native version.Platform-specific setup
Some peer dependencies require additional native configuration.iOS
After installing dependencies, run:Android
No additional steps required. The dependencies will be auto-linked.Expo
If you’re using Expo, all peer dependencies are fully compatible with Expo Go and EAS Build. No additional configuration needed.For managed Expo projects, you may need to run
npx expo prebuild after installing dependencies to regenerate native folders.Configure Reanimated
React Native Bread uses Reanimated for animations. Make sure Reanimated’s Babel plugin is configured in yourbabel.config.js:
babel.config.js
Configure Gesture Handler
Wrap your app root withGestureHandlerRootView in your entry file:
Verify installation
To verify everything is installed correctly, try importing the package:-
Clear your Metro bundler cache:
-
Rebuild your app:
-
For Expo projects:
Next steps
Quickstart
Now that you’ve installed React Native Bread, follow the quickstart guide to show your first toast