Jason Miller
Jason Miller
There's a few PR's open for this. Definitely a needed feature.
This library is not a reimplementation of React Router - it seems like you want React Router (which works fine with Preact).
How would history (eg: back) work if we duplicated state in the router in order to make this work? Perhaps I'm misunderstanding...
For a 404 component, that functionality is already built into the router via `default`: ```js // this will render ErrorPage for any unmatched URLs: ``` Arbitrary redirection is a really...
I agree! I believe this was being worked on.
Just a note: if you have two routes that are the same component type, preact-router won't forcibly unmount and remount that component when changing the URL. You can opt-in to...
(also, totally an aside here, but `route('/')}>` is an antipattern and it's best to use ``. the result is the same, but `` is more accessible)
`componentDidMount()` only runs for client-side renders. `componentWillMount()` runs during SSR, which means setting up subscriptions there would trigger a memory leak (as they are never removed).
Perhaps we could add an option that filters/modifies all received URLs?
I use [npm link](https://docs.npmjs.com/cli/link) locally. You're right about git installs not working, I don't have a solution for that. For contributing, it's fine to send patches via a PR -...