Getting started

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!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.142.146