Closed rschristian closed 2 years ago
It is not only types from history@5
npm package that are incompatible. Also interfaces are incompatible causing incorrect behavior when using custom history@5
without an error. So I think is important to clarify that or even better to upgrade to latest history
.
@janybravo Thanks for the extra info.
What do mean by "...or even better to upgrade to the latest history
"? This lib doesn't actually use history, just used to be compatible. I'm not sure whether it's a goal to be compatible or not either, as undoubtedly this lib updates less frequently than history
which would make it difficult to stay compatible as time went on.
@rschristian. I know that is just and interface. I assumed that history that could be provided to Router via customHistory, should be compatible with history@5
, by which I mean latest version of it.
I see what you mean. If it helps, I have PR ready to have preact-router work better with history@5
if it helps. It would break compatibility with history@4
since they changed their interface.
Support for v5 was added in #410
What kind of change does this PR introduce? Expounding upon documentation
Summary
385 brought up
history
v5's types being incompatible withpreact-router
's. If a new user were to read the custom history section and use the latest version ofhistory
along with TypeScript then they would not be able to build their application.I figure that adding a note is a simple and quick temporary solution for anyone else who comes across this. Let me know if I should change the verbiage in any way.