You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case I have to modify the preact router, to make it supports my own functions/behaviour/etc.
I can't do it right now:
initEventListeners will always be called
I can't write my own route function
I can't write my own setUrl function
example code demonstrating the problem
import PreactRouter from 'preact-router';
export default class ExtendedPreactRouter extends PreactRouter {
constructor(props) {
super(props); // can't do it without it
if (props.history) {
setCustomHistory(props.history); // original code will throw me the error
// even if I have exported the customHistory variable
}
this.state = {
url: props.url || getCurrentUrl(),
};
// initEventListeners(); by the way it will be called, even if commented
}
}
The text was updated successfully, but these errors were encountered:
In my case I have to modify the preact router, to make it supports my own functions/behaviour/etc.
I can't do it right now:
example code demonstrating the problem
The text was updated successfully, but these errors were encountered: