react-redux-starter-kit
react-redux-starter-kit copied to clipboard
pass props from CoreLayout to Nav or Main component
Hello, I done tutorial from reactjs.co related to add session props to my app. Now I am still developing my app and I have new requirements. What i want to do is to pass props from my CoreLayout to for example Nav or Main Conatainer let's say that's my code of CoreLayout.js
class CoreLayout extends Component = {
return (
<div className='container text-center'>
<Nav />
<Main />
<div className={classes.mainContainer}>
{this.props.children}
</div>
</div>
)
}
I want to do in correct way. What I tried to do is to create CoreLayoutContainer but I am stucked with Invariant Violation: The root route must render a single element
in this situation my code is similar to normal Containers with reducers so container file, index.js file is similar to others container and index.js. Main changes is in index.js of all routes I included there index.js of CoreLayout and try change component: CoreLayout to component: CoreLayout(store) but this no works and as I said I stucked with previously mentioned error I hope you can help me :) Best Regards, Cezary
Invariant Violation: The root route must render a single element
it will be better if you show us more of your code