-
Notifications
You must be signed in to change notification settings - Fork 1
Home
John Horback edited this page Sep 22, 2021
·
18 revisions
Use import maps to support automatically calling named imports for lazy loading
This could enable adding an attribute to a route to automatically call import when
the route matches.
This could be as simple as registering an import map with the Router.
Router.setImportMap((importScript) => {
switch(importScript) {
case "user-page":
import("/user-script");
break;
case "default":
throw new Error("import not found");
};
});Would still want to check out the import map specification: "bare import specifiers". See Import Maps
- Create a class that can make requests
- Could supplement sendRequest (and perhaps MockServer)
- Could create a class for each base URL
- Server caching: https://swr.vercel.app/
- MockServer element?!
- sendRequest()?!