Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StrictMode Error: Please update the following components: ScrollContext #21231

Closed
master12 opened this issue Feb 6, 2020 · 6 comments · Fixed by #21626
Closed

StrictMode Error: Please update the following components: ScrollContext #21231

master12 opened this issue Feb 6, 2020 · 6 comments · Fixed by #21626
Labels
good first issue Issue that doesn't require previous experience with Gatsby type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change

Comments

@master12
Copy link

master12 commented Feb 6, 2020

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:

const childContextTypes = {
scrollBehavior: PropTypes.object.isRequired,
}

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

@sidharthachatterjee
Copy link
Contributor

Happy to accept a PR fixing this!

@sidharthachatterjee sidharthachatterjee added good first issue Issue that doesn't require previous experience with Gatsby type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change labels Feb 12, 2020
@akshitkrnagpal
Copy link
Contributor

@sidharthachatterjee
Hey, I am just getting started with Gatsby.
Can I work on this? 😄

@skarunakar
Copy link

@akshitkrnagpal Are you working on this ??

@herecydev
Copy link
Contributor

I've added a PR that should resolve this

@herecydev
Copy link
Contributor

It's worth noting this plugin also calls findDOMNode which needs replacing to be "strict mode compliant"

@github-actions
Copy link

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

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Mar 12, 2020
@herecydev herecydev added not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issue that doesn't require previous experience with Gatsby type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants