I am implementing the global navigation sidebar (left collapsible) with react but I want to exclude or hide my sidebar from some routes or components.
and when I importing it to a particular component I am loosing my component responsiveness.
import React from "react";
//more imports are here
const App = () => (
<ThemeProvider theme={theme}>
<div>
<AppToolbar />
<div className="myclass">
<SideBar>
<Route path="/" exact component={Home} />
<Route path="/setting" component={Setting} />
<Route path="/help" component={Help} />
<Route path="/about" component={About} />
</SideBar>
</div>
</div>
</ThemeProvider>
);
export default App;
Looking for the solution to hide the sidebar from Route path="/" exact component={Home} /> route.
or is there any other way to achieve the same functionality.