How to prevent a component from appearing in a certain route

                    <Route path="/" exact><App/></Route>
                    <Route path="/register" exact><Register/></Route>
                        <Route path="/main" exact><Main/></Route>
                        <Route path="/profile" exact><Profile/></Route>
                    <Footer />

Is there a way to restrict my <Footer/> and <Header/> components from appearing in the "/" and "/register" routes?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.