Currently, you are connectonly a component MainPage or TemplatePage, state dependent. But you do not click the props. Here are some ways you can get it in your child components.
React.cloneElement
using connect connect(mapStateToProps, mapDispatchToProps)(ChildComponent)
You can pass it explicitly from the component MainPage or TemplatePage
<ItemView {...this.props}/> ... <ItemSidebar {...this.props}/>
thank
source
share