score:2

Accepted answer

this ended up being a bug in gatsby, which can be tracked at https://github.com/gatsbyjs/gatsby/issues/6392#issuecomment-404444341.

one way around this is to disable scrolling before the component has been mounted and then reenabling it. this can be done with the following style change:

// styles.css
body {
  overflow: hidden;
}

// component.js
componentdidmount () {
  document.body.style.overflow = 'auto'
}

Related Query

More Query from same tag