StrictMode Error: Please update the following components: ScrollContext
See original GitHub issueI copied this comment from #10179 since it was not really related to that particular error. However this does occur in StrictMode and it would be nice to get this resolved.
It was also posted in this issue #13676 but that has been closed without a resolution.
I’m getting the following error with
StrictMode
:Warning: Legacy context API has been detected within a strict-mode tree: in StrictMode (created by App) in App in _default Please update the following components: ScrollContext Learn more about this warning here: https://fb.me/react-strict-mode-warnings
It seems that
ScrollContext
is still using legacy context: https://github.com/gatsbyjs/gatsby/blob/bddfcbc978da93ae8c13e11622381c8c2a311e4f/packages/gatsby-react-router-scroll/src/ScrollBehaviorContext.js#L14-L16Related:
Reminder: mere presence of legacy context API in the tree puts everything below it onto a slower code path. It is worth migrating away from. — https://twitter.com/dan_abramov/status/1097866569701621763
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
please update the following components: sideeffect(nullcomponent2 ...
I'm using gatsby as example environment for new google maps api, and I need to test it with SSR, but at the same...
Read more >compiler · GitHub Topics · GitHub - GitHub Pages
StrictMode Error : Please update the following components: ScrollContext ... https://github.com/Banou26/parcel2-transformer-raw-bug.
Read more >aurelia/Discuss - Gitter
Does anyone know how I get the Component Unit Tests using Aurelia-testing to work with webpack? I am using karma and es6. I...
Read more >react-shepherd - UNPKG
forEach(assign);\n\t}\n\tif (error !== undefined) throw error;\n\treturn dest ... context);\n}\n\nfunction setComponentProps(component, props, renderMode, ...
Read more >react history push to top of page Code Example
src/App.js Attempted import error: 'Switch' is not exported from 'react-router-dom'. ./src/components/Header/HeaderElements.js [1] Module not found: Can't ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve added a PR that should resolve this
Hiya!
This issue has gone quiet. Spooky quiet. 👻
We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label “not stale” to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! 💪💜