aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-10 02:36:12 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-10-10 02:36:12 +0200
commit352f059eb232052aa80814e77e4a9c17d300db5b (patch)
tree8dd85c71c31d54904429cd423235547fc6b696c8
parentdb0fc776982a61181baf286c8344a3b11d3531ec (diff)
use right update functions
-rw-r--r--popup/popup.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/popup/popup.tsx b/popup/popup.tsx
index 5fcc871e2..fd24f83a4 100644
--- a/popup/popup.tsx
+++ b/popup/popup.tsx
@@ -43,7 +43,6 @@ function onUpdateNotification(f: () => void) {
class Router extends preact.Component<any,any> {
static setRoute(s: string): void {
window.location.hash = s;
- preact.rerender();
}
static getRoute(): string {
@@ -64,7 +63,7 @@ class Router extends preact.Component<any,any> {
componentWillMount() {
console.log("router mounted");
window.onhashchange = () => {
- this.forceUpdate();
+ this.setState({});
for (let f of Router.routeHandlers) {
f();
}