Introduction
Loader functions get data before your page shows. This helps your page load with all needed info ready.
You want to show a list of items from a server when a page opens.
You need to get user info before showing their profile page.
You want to fetch data once and use it in your page components.
You want to avoid loading spinners by having data ready on page load.