From 607535410d7c7e95b1274b3e6a320deebf7aa494 Mon Sep 17 00:00:00 2001 From: stevo Date: Sun, 27 Sep 2015 14:38:09 +0100 Subject: [PATCH] Fix back/forward properly --- src/client.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client.js b/src/client.js index 942f2b466..956147bc8 100755 --- a/src/client.js +++ b/src/client.js @@ -52,8 +52,11 @@ const render = (loc, hist, str, preload) => { }); }; -history.listen((loc) => { - render(loc, history, store, true); +history.listen(() => {}); + +history.listenBefore((loc, callback) => { + render(loc, history, store, true) + .then((callback)); }); render(location, history, store);