react-native-gifted-chat
react-native-gifted-chat copied to clipboard
Incompatible with `react-native-safe-area-context` version < 4
Issue Description
Crashes on web when react-native-safe-area-context
version < 4.
Throws error Uncaught Error: No safe area value available. Make sure you are rendering
<SafeAreaProvider> at the top of your app.
Works fine when react-native-safe-area-context
version is >= 4.
Steps to Reproduce / Code Snippets
- Initialize a new Expo app with the CLI
- Install
react-native-safe-area-context@3
- Copy the demo into the app
- Run on web and see the error
Expected Results
I would expect the app not to crash, or at least a message saying to update react-native-safe-area-context
.
Additional Information
- Nodejs version: 16.51.1
- React version: 17.0.2
- React Native version: 0.68.2
- react-native-gifted-chat version: ^1.0.4
- Platform(s) (iOS, Android, or both?): Web
- TypeScript version: ~4.3.5
- react-native-safe-area-context version: 3.3.2 (Expo SDK 44 Default)
Got issue about SafeArea also but
Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider
Fixed by the answer: https://stackoverflow.com/questions/72469920/invariant-violation-tried-to-register-two-views-with-the-same-name-rncsafeareap/72470161#72470161
installed [email protected]
before installing a new version of "react-native-safe-area-context" you should check what version in "react-native-gifted-chat": npm list react-native-safe-area-context and get version from
as we are using yarn there is no dedupe, it is being done automatically, for us the issue was pinning a specific version of [email protected], after changing to ^4.3.4 it worked
I was facing the same issue i had to uninstall and install "react-native-safe-area-context": "^4.4.1",
facing the same problem
Should be fixed with https://github.com/FaridSafi/react-native-gifted-chat/pull/2353 and https://github.com/FaridSafi/react-native-gifted-chat/releases/tag/v2.0.0