From 352f059eb232052aa80814e77e4a9c17d300db5b Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 10 Oct 2016 02:36:12 +0200 Subject: use right update functions --- popup/popup.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'popup') 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 { static setRoute(s: string): void { window.location.hash = s; - preact.rerender(); } static getRoute(): string { @@ -64,7 +63,7 @@ class Router extends preact.Component { componentWillMount() { console.log("router mounted"); window.onhashchange = () => { - this.forceUpdate(); + this.setState({}); for (let f of Router.routeHandlers) { f(); } -- cgit v1.2.3