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'
}
Source: stackoverflow.com
Related Query
- How do I prevent the browser from scrolling to the top on render
- How to prevent a modal that is placed absolute centered from touching the top of the broswer when only height of screen is changing
- How to stop react component from going past the top of the page when scrolling
- React.js: Stop render from scrolling to top of page
- How to get the data from React Context Consumer outside the render
- React, how to access the DOM element in my render function from the same component
- How to prevent react from re-rendering the whole component?
- How can I call methods on Reactjs components in the browser console or from an outside script?
- How can I get the URL address from the browser in ReactJS (servers URL)
- How to pass the match when using render in Route component from react router (v4)
- How to return an empty jsx element from the render function in react?
- How to prevent redux-persist from using LocalStorage before it has been allowed by the user?
- ReactJS: How to prevent browser from caching static files?
- How do I prevent Material UI Dialog from being dismissed upon clicking the backdrop?
- In React, how to prevent a component's CSS import from applying to the entire app?
- How to prevent React from re-rendering the whole component
- How do we return a Promise from a store.dispatch in Redux - saga so that we can wait for the resolve and then render in SSR?
- How to prevent react-route from re-render the whole app when changing url
- Throttling navigation to prevent the browser from hanging in React App
- Chrome: Throttling history state changes to prevent the browser from hanging. ReactJs and jQuery
- How can I render in my column names conditionally AFTER the list is pulled from my backend?
- How to prevent the onmouseleave event from being triggered outside the browser?
- How to prevent background-image from zooming on mobile browser when adding elements vertically?
- AWS Amplify in React, how can I render the new data from the subscribed listener
- I have a div with a onClick handler and also buttons inside with onClick events. How do I prevent the buttons from firing the div onclick?
- Django Rest Framework and React Front End: How to prevent unauthorized users from viewing private images if they get a hold of the image URL?
- How do I prevent node from logging an exception to the console in my NextJS/Express app?
- Styled Component - How to prevent a prop from being passed to the extended component?
- Issue with tailwind, how to prevent w-0 letting a modal overflow from the page?
- How can I render the L.featureGroup from an array of coordinate
More Query from same tag
- React Router - URL changes but not Component
- React TypeScript: Correct type for useLocation() from react-router-dom
- Using multiple setHook makes component render more than once?
- ReactNative - Tapping row in ListView gives error: Cannot read property `_pressRow` of null
- How do I change Component Attribute on onClick in React?
- How to implement infinite scroll with Github API Repositories List
- Handling local data in Relay Modern
- How do you make a button show a + (plus sign) when not clicked, and - (minus sign) when clicked?
- Encountered two children with the same key, `[object Object]`
- Can I pass props to the children via props.children React JS
- Order of ifs altering final result
- Updating nested redux state
- {this.props.PROP} within a ClassName .- ReactJS
- How can I get the data out of a table using Semantic UI React
- How to create new variable instance with useState (React Hook) each time a user fires a specific action
- How to implement a scrollspy with React
- Typescript Routing Error - No overload matches this call
- how to get rid of "unexpected token 0 in JSON at position 0"? which time this error is actually shown? What's the major reason to show this error?
- ReactJS passing input data to next screen/component
- How do you pass data to react components from express or koa without renderToString?
- React refs email form
- enable edit for cell field at row grouping level ag-grid
- How to create an image with gradient where top has opacity 100% and bottom with opacity 0%?
- Cannot access exposed Dockerized React app on Kubernetes
- CRA, Node.js, nginx in Docker?
- Cannot access object properties via props in ReactJS
- How to repeat promise chain
- Detect redux store changes
- React-native: Looks like you installed react-native globally
- Flux: waitFor specific event