Closed xaviramirezcom closed 6 years ago
Hi, @xaviercobain88 - thanks for submitting an issue. To be able to investigate we need a little more context. The best thing would be a short snack on Expo - or a description of what you're trying to do, why and how you reproduce this issue. Otherwise it'll be closed :-)
@chrfalch I'm also getting this issue. Didn't have to do anything special, just apply withNavigation
to any element other than the screen itself.
@israelidanny: But I need to know what you are trying to accomplish - why use withNavigation()
- to get a clearer understanding of the use case. That's why I have attached the Reproduction Needed label to the issue :-)
@chrfalch I'm using withNavigation()
for its' official documented use:
To be able to use the navigation
prop without having to drill it down through the whole tree to my specific component.
Ok, would it be possible to create a simple reproduction using http://snack.expo.io?
This seems to reproduce it (however instead of showing the error message it loses connection with device): https://snack.expo.io/HkpaLcJYQ
Try adding the following (satic router...) to the exported class (just like in the examples):
export default class App extends Component {
static router = Navigator.router;
render() {
return (
<Navigator/>
);
}
}
im also getting this issue im trying to call "this.prop.navigation." inside component by importing withNavigation
I've tested out the snack in my debugger, and the same error occurs when using createStackNavigator
as with FluidNavigator. You should all probably try to find out if this is an issue with your navigation setup. I'm closing this one for now. @Rekian @israelidanny @xaviercobain88
I'm running into the same issue. Replacing FluidNavigator(...)
with createStackNavigator(...)
fixes it, so it seems to be a problem with react-navigation-fluid-transitions
.
Here is a reproducible example: https://snack.expo.io/rkkqMjWqQ
If you go to Router.js
and use createStackNavigator
instead, it'll work. I used react-navigation-fluid-transitions@2.6
because newer versions throw a dependency error in Expo.
Wrapping a component with
withNavigation
throws the following error: