Daniel Bäckström
Results
1
comments of
Daniel Bäckström
Scroll restoration happens too early before the page gets rendered after hitting browser back button
This worked for me: **_app.js** ``` componentDidMount() { window.history.scrollRestoration = "manual"; const cachedScroll = []; Router.events.on("routeChangeStart", () => { cachedScroll.push([window.scrollX, window.scrollY]); }); Router.beforePopState(() => { const [x, y] = cachedScroll.pop();...