AI, Data Science & Cloud Certificates from Google, IBM & Meta
Launch Your Cybersecurity Career in 6 Months
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This tutorial demonstrates upgrading and refactoring a React blog from React Router v5.2 to v6. It covers the new routing structure, layout and Outlet components, nested routes, navigation hooks, URL parameters, and testing the refactored application.
Syllabus
Intro
Welcome
Look at the docs
The Starter Project
Installing React Router Version 6
Updating the Index.js
Updating the App.js imports
useNavigate replaces useHistory
Adding a Layout Component
Adding Outlet index content
Nested Routes
Additional Routes
Review of the Routing Structure
Link and useParams
Testing the Refactored Code
Taught by
Dave Gray