I managed to create a website for myself using ReactJS. Everything works fine except that my last addition of an Error Page turns out that is rendered underneath every other page that is rendered. I.e. if I go to /localhost:3000/blog where all the blog elements are rendered, underneath this and above footer the Error404 component is also rendered. Any advice so I can expand my so far limited knowledge? The app component is this:
const App = () => {
return (
<Router>
<Switch>
<Route exact path="/">
<Home />
</Route>
<div className="appWrapper">
<NavBar />
<Route exact path="/blog">
<Blog />
</Route>
<Route exact path="/article/:id">
<Article />
</Route>
<Route exact path="/contact">
<ContactForm />
</Route>
<Route path="*">
<Error404 />
</Route>
<Footer />
</div>
</Switch>
</Router>
)
}