Skip to content

Instantly share code, notes, and snippets.

View AndersonNascimentoDosSantos's full-sized avatar
🎯
Focusing

Anderson Nascimento Dos Santos AndersonNascimentoDosSantos

🎯
Focusing
View GitHub Profile
@AndersonNascimentoDosSantos
AndersonNascimentoDosSantos / _app.js
Created April 21, 2022 14:19 — forked from claus/_app.js
Restore scroll position after navigating via browser back/forward buttons in Next.js
import useScrollRestoration from "utils/hooks/useScrollRestoration";
const App = ({ Component, pageProps, router }) => {
useScrollRestoration(router);
return <Component {...pageProps} />;
};
export default App;