I have a Component named Layout that should render different child components depending on the route. 
Parent component
export default class Layout extends Component{
    render(){
        return (
            <div>
                <div>
                    <div>
                        <Navbar/>
                        {this.props.sidebar}
                        {this.props.content}
                    </div>
                </div>
            </div>
        );
    }
}
In my main.jxs i want to render 3 Route using the Layout component with different ChildComponent passed as sidebar and content props like:
<Route path="/profile" component={sidebar: <Sidebar />, content: <Content />} />
<Route path="/user" component={sidebar: <Sidebar />, content: <User />} />
<Route path="/edit" component={sidebar: <Sidebar />, content: <Edit />} />
Components are imported as well. In other words, i want to dynamically change the content of layout based on the route. How can i achieve this using react-router-dom ?
 
     
    