-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Description
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
}
}
moebiusmania
Metadata
Metadata
Assignees
Labels
No labels