Determine if at least one of the routes is asking to load JS and return a
boolean.
To request JS to be loaded, the route must export a handle with an object,
this object must contain a boolean property named hydrate or a function
named hydrate, in which case the function will be called with the data
from the loader of that route so it can be used to dynamically load or not
JavaScript.
Returns boolean
Example
// This route needs to load JS exportlethandle = { hydrate:true };
Example
// This route uses the data to know if it should load JS exportlethandle = { hydrate(data: RouteData) { returndata.needsJs; } };
Determine if at least one of the routes is asking to load JS and return a boolean.
To request JS to be loaded, the route must export a handle with an object, this object must contain a boolean property named
hydrate
or a function namedhydrate
, in which case the function will be called with thedata
from the loader of that route so it can be used to dynamically load or not JavaScript.