valeria-daffarra / react-router-lesson

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This project was bootstrapped with Create React App, using the Redux and Redux Toolkit template.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

Learn More

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

-Install react-router-dom to add it to your React applications -Enable routing by wrapping your application’s contents in the BrowserRouter component -Make your code more concise by aliasing BrowserRouter component to Router -Use the Route component to add routes to your application -Use the Route component’s path prop to specify static routes (those without -URL parameters, eg. /users) and dynamic routes (those with URL parameters, eg /users/:userId) -Access the values of URL parameters using React Router’s useParams hook -Declaratively redirect users by rendering React Router’s Redirect component -Imperatively redirect users by accessing the history object via the useHistory hook and calling its goForward, goBack, and push methods. -Access the value of query parameters using React Router’s useLocation hook

About


Languages

Language:JavaScript 82.4%Language:CSS 9.9%Language:HTML 7.8%