I'm trying to figure out how to set style to parent component while child component state change
consider a scenario in which we have a container component containing menu and side bar as its static elements plus
child-component. while clicking the menu, it's corresponding component will render as child-component.
I'm using nested absolute route with react-router as follow
<Route component={ home } >
<Route path="menu-1" component={ menu-1 } />
<Route path="menu-2" component={ menu-2 } />
<Route path="menu-3" component={ menu-3 } />
inside home component i have something as follow:
<div className='root'>
<menuComponent />
<sideBarComponnent />
{this.props.children}
</div>
as you can see i can't pass callback function to child-component
for menu-1 , menu-2 i have no problem, but while clicking menu-3 and rendering it's component in the content tag,
i need to give it full width and set side bar display to none
while the side bar has rendered in the container component i can't control it inside the child-one in a regular way
Im looking for a way which can be able to handle it inside home component