The react-router library is practically a standard for handling routing within React applications. Installing it requires a subtle distinction: instead of directly getting that package, you must pick a different package, react-router-dom, which will itself take care of getting react-router:
npm install react-router-dom --save
We can easily build an application with several links, a router that will take care of rendering whichever view is correct, and even a 404 page for wrong links. Of course, we'll focus on the routing aspects, so in other terms, our application will be more of a skeleton than an actual usable web pageāand don't get started on its very plain styling!