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

Bug: Legacy context warning is misreporting the parent element #18431

Closed
mikecousins opened this issue Mar 29, 2020 · 2 comments
Closed

Bug: Legacy context warning is misreporting the parent element #18431

mikecousins opened this issue Mar 29, 2020 · 2 comments
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@mikecousins
Copy link

React version: 16.13.1

Steps To Reproduce

  1. Put react-stripe-elements inside redux
  2. View your warnings

Link to code example: https://codesandbox.io/s/trusting-ramanujan-0yhqb

The current behavior

Throws a warning saying the Redux Provider element is using legacy context.

The expected behavior

Throw a warning saying the react-stripe-elements StripeProvider element is using legacy context.

@mikecousins mikecousins added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Mar 29, 2020
@mikecousins
Copy link
Author

mikecousins commented Mar 29, 2020

I dug into this a bit more and found the probable cause of it:

https://github.com/stripe/react-stripe-elements/blob/master/src/index.js#L2

Inside the react-stripe-elements the file is called Provider and is being renamed to StripeProvider. Sooo, it's mostly just a naming coincidence.

I don't know if it's possible to somehow report the package name though instead of the component name if it's an external library though?

@gaearon
Copy link
Collaborator

gaearon commented Mar 29, 2020

No, we can’t report the package name. Seems like everything is correct then. Just a naming coincidence.

@gaearon gaearon closed this as completed Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants