How it works…

If you npm start the application and then navigate to it, you'll get the home page, as in the following screenshot:

 Our routing application, showing the component for the basic "/" route

If you select any valid route (that is, don't pick the Wrong one, at least not yet!), the matching route will be activated, and the corresponding component will be displayed, as shown in the following screenshot:

 Picking a valid route gets you the corresponding component

Finally, if you pick a wrong route, the default component will be shown, as follows:

 The last route in our <Switch> is a catch-all for undefined routes
..................Content has been hidden....................

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