question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StrictMode Error: Please update the following components: ScrollContext

See original GitHub issue

I 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-L16

Related:

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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
herecydevcommented, Feb 20, 2020

I’ve added a PR that should resolve this

0reactions
github-actions[bot]commented, Mar 12, 2020

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! 💪💜

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found