...
/Creating Application Layout and Installing Bootstrap
Creating Application Layout and Installing Bootstrap
Learn about routing in a React application and styling a React application with Bootstrap.
Application layout
The bookshop application’s structure determines that we have some of our components available to the users only if they’re authenticated. In the previous lessons, we implemented Meteor authentication using the accounts-password
package. This lesson builds on the previous by adding client-side routing to the application.
React Router
A router is used by a single page application (SPA) to navigate between different screens or components of the application. React Router is a npm
package that’s installed through the terminal to add routing capabilities to an application. An application that’s non-trivial needs a way to navigate between all components available in it.
The React Router is added to our project by running the command below on the terminal inside the project directory. This command installs and adds the router package to the project.
meteor npm install react-router-dom
The coding playground below captioned “React application with routing using React Router” is a sample React application that shows how React ...