I'm making my way through the Remix Singles playlist to actually grasp the data loading/mutation API offered by Remix, and I'm a little confused.
I thought whenever we use any loader data from useLoaderData, the required data is fetched server-side and we get fully-formed documents. But in this Remix Single (https://www.youtube.com/watch?v=NXqEP_PsPNc&list=PLXoynULbYuEDG2wBFSZ66b85EIspy3fy6), we see that there's actually a network request sent for loader data, and later somehow when we refresh the page it's all server-rendered and no network request is made.
How do I form the correct mental model for which situations we're server-rendering things, vs. ones where we are rendering client-side?
The first thing you usually need for any route is a way to load data from the server. Remix makes it easy with loaders.
Learn more at https://remix.run/docs