Answer the question
In order to leave comments, you need to log in
How to hide unnecessary components?
Good day,
There is an App component, it has a Switch, in which Route's are registered.
It is necessary to make sure that when loading some Route , the MainCases component is hidden
<BrowserRouter>
<div className="wrap">
<Header />
<Switch>
<Route path={'/'} exact component={MainBanner} />
<Route path={'/contacts'} exact component={Contacts} />
<Route path={'/cases'} exact component={Cases}/>
<Route path={'/case1'} exact component={Case1}/>
</Switch>
<MainCases /> <----- ЭТОТ КОМПОНЕНТ НУЖНО СКРЫТЬ
</div>
</BrowserRouter>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question