preact-router
preact-router copied to clipboard
Match component regex/wildcard matching?
trafficstars
Would there be any mileage/interest in altering this so that the matching can support wildcards (probably with a regex)? I suppose the issue would potentially be handling the values that the wildcards are matched against - for my current use case that's not an issue but I can imagine somebody wanting to do something like this if the option is there.
https://github.com/developit/preact-router/blob/e73850430e32b61677d5cbcacd91ef2a81e89358/src/match.js#L22
Maybe we could allow a function or regex in addition to a pattern string? Could just let the regex matches be passed down as numeric properties.