score:2

Accepted answer
<Router>
  <Routes>
    <Route element={<HeaderLayout />}>
      <Route path='/' element={<Header />} />
      ... other routes with header
    </Route>
    ... routes w/o header
  </Routes>
</Router>

score:2

<Routes>
        <Route exact path='/' element={<HomeAndHeader/>}/>
</Routes>

Related Query

More Query from same tag