I'm updating my universal react redux app to use react router v4. I have nested routes under a main layout route. Previously I used {props.children} to show contents of child routes, but this doesn't work anymore. How does this work in V4?
<Provider store={store} key=provider>
<div>
<Route component={Layout} />
<Switch>
<Route path=/ component={HomePage} />
<Route component={Error404} />
</Switch>
</div>
</Provider>
or
<Provider store={store} key=provider>
<Layout>
<Route path=/ component={HomePage} />
<Route component={Error404} />
</Layout>
</Provider>
This is how my Layout file looks
const Layout = props => (
<div className=o-container>
<Header />
<main>
{props.children}
</main>
<Footer />
</div>
);