Learn
Great work! You’ve learned everything you need to know to add front-end routing to your React applications using React Router! To recap, you’ve learned how to:
- Install
react-router-dom
and add it to a React application. - Enable routing by using
RouterProvider
and providing arouter
. - Creating a router using
createBrowserRouter()
. - Use
createRoutesFromElements()
to configure a router. - Use the
Route
component to add static and dynamic routes to an application. - Use
Link
andNavLink
components to add links to an application. - Access the values of URL parameters using React Router’s
useParams
hook. - Create nested routes using
Route
,Outlet
, and relativepath
s. - Declaratively redirect users by rendering React Router’s
Navigate
component - Imperatively redirect users via the
useNavigate
hook. - Access and set the value of query parameters using React Router’s
useSearchParams
hook.
Great job learning about React Router. You’ve learned a lot of about React Router’s core functionality. If you’d like to explore more you can check out the official docs here.
We encourage you to continue practicing what you’ve learned and experimenting with the React Router on your own.
Instructions
If you’d like to compare your solution to ours, you can download our solution here.
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.