Closed zlondrej closed 4 months ago
This looks to be intentional: https://github.com/preactjs/preact-router/pull/211
I saw the commit before, but didn't understand the explanation at first. Mostly because I'm making a simple application that doesn't deal with path/query parameters.
After a second look, I still don't like it, but at least it makes some sense.
There very well might be a better way to deal with that, I'm not a huge TS fan/user myself, just wanted to bring that up as it does seem to serve a legitimate purpose.
If you do know a better option than Partial
, happy to have it here
Using TypeScript made me use
<Route />
wrapper, but it makes all the component's props optional. That kinda goes against the idea of using TypeScript in the first place.