I'm a newbie learning ReactJS. I kinda stucked at this stage . Currently I want to render <Header />
for all pages. However, now I want Route Day1 not to display <Header />
, I've posted code bellow. What should I do?
function App() {
return (
<Router>
<Header />
<Routes>
<Route path="Day1" element={<Day1 />} />
<Route path="Day2" element={<Day2 />} />
<Route path="Day3" element={<Day3 />} />
<Route path="News" element={<News />} />
<Route path="Profile" element={<Profile />} />
<Route path="404NotFound" element={<NotFound />} />
<Route path="/" element={<Homepage />} />
<Route path="*" element={<Navigate replace to="/404NotFound" />} />
</Routes>
<Footer />
</Router>
);
}
Please help as i'm new and cant able to figure out What's the issue. I'm currently on React-router V6