diff --git a/README.md b/README.md index b598cdb8632a9..5cdd716e32508 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ Websites built with Gatsby: * [ERC dEX](https://ercdex.com) * [iContract Blog](https://blog.icontract.co.uk) * [Dona Rita](https://donarita.co.uk) ([source](https://github.com/peduarte/dona-rita-website)) +* [Andy Slezak](https://www.aslezak.com) ([source](https://github.com/amslezak)) ## Docs diff --git a/packages/gatsby/src/utils/api-browser-docs.js b/packages/gatsby/src/utils/api-browser-docs.js index d14771b52f708..48c358ead6183 100644 --- a/packages/gatsby/src/utils/api-browser-docs.js +++ b/packages/gatsby/src/utils/api-browser-docs.js @@ -35,6 +35,11 @@ exports.onRouteUpdate = true * @param {object} $0 * @param {object} $0.prevRouterProps The previous state of the router before the route change. * @param {object} $0.pathname The new pathname + * @example + * exports.shouldUpdateScroll = (prevRouterProps, pathname) => { + * window.scrollTo(0, 0) // upon navigation, scroll to top of page + * return false + * }; */ exports.shouldUpdateScroll = true