Data fetching with loaders
Well done! You have successfully added loaders to multiple routes and you've learned
how to optimize data fetching by parallelizing requests using
Promise.all, how
to call a database and return data to your components, and how to read URL parameters
to fetch data based on those parameters.We also completely removed the mocked data and replaced it with a real database using
Prisma and SQLite, which is a great skill to have when building real-world applications.
Now that you fully understand loaders and how to use them effectively, let's
move onto the next module when you're ready!