One thing every React application needs is routing, which is why libraries like React Router and TanStack Router are so popular. It may seem intimidating trying to understand how these libraries work (especially when it comes to type safety) which is why in this video I will show you how I built my own fully type safe router from scratch.
📚 Materials/References:
GitHub Code: https://github.com/WebDevSimplified/m...
Will AI Replace You Video: • The Truth About AI and Coding. Is Your Job...
🌎 Find Me Here:
My Blog: https://blog.webdevsimplified.com
My Courses: https://courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: https://github.com/WebDevSimplified
CodePen: https://codepen.io/WebDevSimplified
⏱️ Timestamps:
00:00 - Introduction
01:47 - How to use the router
06:20 - Route matching
12:45 - Router context
15:40 - Type safety explained
20:55 - Route definition
25:28 - Outlet and layout components
30:39 - Link component
32:30 - Creating a new route example
34:38 - Can AI write this code?
#ReactJS #WDS #ReactRouter