-
Notifications
You must be signed in to change notification settings - Fork 0
Description
This is just an idea in the wild. I personally think there are plenty of good options for this, starting with the official Sveltekit, followed by @roxy/routify and the newer sv-router, which I came to know recently.
Of course, none of these have the N°1-in-the-world features of this router, namely:
- Simultaneous hash and path routing.
- Multi hash routing.
- Disconnected pieces of user interface.
I have no idea if these will make this router popular in the long run or not. The first two I came up with because I like architecting UI's with micro-frontends, and having multiple paths available unlocks amazing possiblities for user interfaces, like side-by-side layouts in large displays.
The third one came to mind when I envisioned a MFE layout where the shell MFE would provide the "space" to place menus/toolbars for the loaded data MFE's. Effectively, we're talking micro-frontends that really come in pairs: The main data application, and the menu/toolbar application, and each would mount in different parts of the MFE shell's HTML markup.
No other router in the world, at least as of today, is known to pull any of these off.
Specifics
I don't have many specifics right now, and is just an idea I intend to leave documented in this issue for people to read/vote/contribute, if there's interest.
I'm thinking about an Unplugin plug-in that can pick up on the contents of the configured folder path (default to src/routes) and build the router and routes from there.
It would then emit one or more files with code that inject router engines into the application.
This is about all I have thought at the moment.
There are many more details to cover. Just to name a few:
- How to pass route parameters and other data/functionality shared by routers and routes via the chidren snippet's parameters.
- How to enable disconnected pieces of user interface.
- How to handle more than one routing universe. Is this even possible?
I think this is it, for now. Thanks for reading!