# React Router

## Objectives

* Describe 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://romebell.gitbook.io/sei-802/archived-section/10-react-2016-archived/react-router.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
