Closed projodesign closed 2 years ago
Managed to fix it.
I needed to use: "react-navigation-shared-element": "^5.0.0-alpha1".
I did follow the official install instructions for React Navigation 5: https://github.com/IjzerenHein/react-navigation-shared-element/blob/HEAD/docs/API.md#createsharedelementstacknavigator
This installs version 3.1.3. Should the docs not state:
yarn add react-navigation-shared-element@5.0.0-alpha1
?
I'm experiencing a similar issue.
@projodesign version 5.0.0-alpha1
is an older, beta version that was released long ago.
v3.1.3
is the latest version that works with react navigation 5, and so reverting back to an older version isn't a solution - please reopen the issue :)
Updating react navigation dependencies seems to solve the issue: https://github.com/IjzerenHein/react-navigation-shared-element/issues/196#issuecomment-922251528
I keep getting the below message when trying to work with react-navigation-shared-element. I've tried on two different projects, including following a tutorial to the letter. But both projects have the same issue.
App.js
RootNavigator.js
TournamentsScreen
Note, the app works if I use createStackNavigator, but I get the above error message if I use createSharedElementStackNavigator.
Also should the app still work without implementing the SharedElement component anywhere? This tutorial suggests it should: https://blog.logrocket.com/how-to-use-shared-element-transition-with-react-navigation-v5/
Here are the package versions:
"@react-navigation/native": "^5.8.2", "@react-navigation/stack": "^5.11.1", "react-native": "0.63.3", "react-native-shared-element": "^0.8.3", "react-navigation-shared-element": "^3.1.3",
Thank you.