Войти
  • 13247Просмотров
  • 11 месяцев назадОпубликованоAlem Tuzlak

The Benefits of React Router V7 Nobody Told You About

Today we go over everything you need to know about accessing loader data in react router v7, how it benefits you, how you can approach it in different ways and you come out a better developer at the end of it! 👍 Don't forget to like, comment, and subscribe for more episodes in this series! Join our coding community and let's build something amazing together. 📌 Stay Connected: Twitter: GitHub: Company Github: ⏱️ Timestamps: 00:00 - intro 00:25 - explaining how the context works with nested routes 01:39 - how the routes provide data to the child routes 03:25 - how it works in a react 04:11 - why having access to parents loader data is cool 07:33 - demo setup 08:15 - checking out the demo setup in the browser 08:35 - creating loaders to consume data from 09:47 - switching back to the browser and checking out the loader data 10:33 - useMatches example 12:31 - making useMatches typesafe 13:58 - useRouteLoaderData improvement over useMatches 15:45 - using matches from the ComponentProps 20:04 - answering how to determine where to fetch what 21:17 - how to use useRouteLoaderData in the best way 23:37 - final thoughts 🔖 Tags: Vite, react router Vite, web development, frontend development, coding tutorial, open source, coding community, react router, react router tutorial