[00:00] Root preloading is a feature in 10-Stack Router which is going to fire the loaders of a certain root even before we walk into that root. So here I've got our app opened and I'm in the home root and we can see when I open the network DevTools tab that there has been no HTTP requests fired so far. Now if I walk into the about route then there is no HTTP request either. Now that's because both of these routes don't have the loader property defined. Now if I want to walk into the employees and what's important I have not yet clicked it so I didn't even walk into the employees route.
[00:46] I just hovered the link with the cursor. We can see that the request has been made and that's essentially preloading. So TastakRouter assumes that most of the time if the user is about to walk into a route, it's quite likely that they would do it. Now we're going to run the loaders eagerly so that when the user actually clicks the link then the data is already here. So here you could have noticed that there is a second request, so it all boils down to configuration of things like stale time, GC time, etc.
[01:24] We're going to get back to them later. Essentially, the preloading feature is turned on for all routes by default and the behavior is that it's going to fire whenever the link to a certain route that has the loaders is just hovered. So that's all that is going to do. Now if you don't want this feature to be executed this way you can turn off preloading by specifying the preload flag over the root configuration and just put false. Now let me just walk back to the home route.
[02:04] I'm going to reload the application over here. And now when I switch between home and about nothing happens. Obviously, there are no requests being made. However, if I hover over employees, there is no preloading as we can see over here but if I click then I am going to lazily so in the latest possible moment start running it and you could have seen that there was a slight delay between walking into the about and employees.