Skip to content

Instantly share code, notes, and snippets.


remy/Layout.js Secret

Last active Nov 5, 2018
What would you like to do?
Add the following to the top of your Layout.js componet
import NProgress from 'nprogress';
import router from 'next/router';
router.onRouteChangeStart = () => NProgress.start();
router.onRouteChangeComplete = () => NProgress.done();
router.onRouteChangeError = () => NProgress.done();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment