I’m running into a problem where my child routes return null. In the past I know I would nest routes & call {this.props.children} in the render method to render those routes. It looks like that pattern has gone away with React Router v4 beta.
FYI - if I move the <Router> component into the App.js all routing works, but I lose access to the {match, history, location} props. If I keep the Router in the index.js I have access to those props but routing and linking to children breaks.
Question - I am facing the exact same issue, but my “match” prop is fixed at path/url = “/” due to the main Route (“App” in your example). How did you go about this?
I literally just signed up to this site to express my gratitude. Removing the “exact” attribute from my parent Route is what resolved the issue of my child Routes not rendering. Which makes a lot of sense when you consider what “exact” does. It only matches (and hence renders) when the pathname is exactly == to the path.
Thanks again!
Here’s my example for future reference for anyone else that comes across this problem: