React Router
Objectives
- Review the concept of React components
- Identify situations where a view router is needed
- Use
react-router
to create different pages in React - Configure
react-router
to utilize route parameters
Intro
In AngularJS, we utilized the Angular UI Router to route between different views. Each route was represented via state, and each state could be associated with a view and controller.
React has a similar router called React Router. However, we need to think in terms of React. Each route in React will be represented via a component, which contains state and a view. Therefore, we can use the router to switch between different components.