jmurzy / react-router-native

A routing library for React Native that strives for sensible API parity with react-router 🤖
MIT License
638 stars 44 forks source link

Router not passed to children #69

Open VinceBT opened 7 years ago

VinceBT commented 7 years ago

Hi, I'm using your package for an hybrid app working on both browser and mobile and I've discovered that this.props.router is undefined when on mobile when calling console.log(this.props) in the render method of a Route : Using ReactRouter

image

Using ReactRouterNative

image

I've fixed the problem temporarily by using withRouter.

I'm using nativeHistory on mobile and browserHistory on browser

petromoldovan commented 7 years ago

@VinceBT I am having the same issue. could you please share how did you manage to overcome it?

VinceBT commented 7 years ago

I've used the withRouter function if I can remember. You call it and get the router I think. I've stopped using their package since they don't want to fix these kind of essential issues.

petromoldovan commented 7 years ago

@VinceBT thank you!