Pass props through a higher order component from a Route
I have a problem with my Higher Order Component. I am trying to pass props from a <Layout /> component down a route (React Router v4). The components specified in the routes are wrapped by a HOC, but the props that I pass never reaches the component. Also, I can't use the HOC without using export default () => MyHOC(MyComponent) . I can't figure out why, but that might have something to do with it? Layout.js const Layout = ({ location, initialData, routeData, authenticateUser }) => ( <Wrapper> <Container> <Switch> // how do I get these props passed through the HOC? render instead of component