I am a beginner to React! I just recently learned about React routing. But, I am a little confused.
How can I hide my navBar(Menu) inside the login page? I want to show all of the pages except the login page. How to do this in an easy way?
Below is the code for my AppComponent:
class App extends Component {
constructor(props){
super(props)
this.state = {
backgroundUrl: ''
}
}
async componentDidMount(){
}
state = { }
render() {
return (
<Router>
<div>
<Navigation/>
<Switch>
<Route path='/' exact component={Dashboard}/>
<Route path='/About' component={About}/>
<Route path='/Contact' component={Contact}/>
<Route path='/Login' component={LoginConpoment}/>
</Switch>
</div>
</Router>
);
}
}
export default App;