Should `/...args` just be `/...` and autonamed `args` so there's a standard to build abstraction on.
It's not documented yet, but /...args
is the secret to having typesafe code splitted nested routes.
But... it's hard to build abstractions on top of superouter generically without having a standard property for grabbing spreads.
It's also annoying having to provide { args: '' }
when instantiating route instances with a spread. That should be automatic.
This wouldn't make sense if you could have multiple spreads in a pattern, but we already prohibit that:
So why have a name when you can only have one?
This raises the question, is having multiple variadics useful? Maybe... but I think that's a separate usecase we might support with a *
wildcard. ...
is saying, there can be stuff after this prefix, and that's a special concept for extending a route. It's saying whether superouter needs to enforce an exact match or not.
*
can be a different thing, that says, this segment can be whatever. But that's only a wildcard for one segment per wildcard. We could support globs one day, I don't know, but I don't think I've ever wanted or needed that in UI routing.
I think I'm sold on this. { args: '' }
is one of my least favourite parts of this lib.