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

Legacy context API has been detected within a strict-mode tree #186

Closed
stahlmanDesign opened this issue Jan 22, 2020 · 5 comments · Fixed by #200
Closed

Legacy context API has been detected within a strict-mode tree #186

stahlmanDesign opened this issue Jan 22, 2020 · 5 comments · Fixed by #200
Assignees
Labels
incomplete Needs more info to resolve invalid
Milestone

Comments

@stahlmanDesign
Copy link


The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.

Please update the following components: withAvatarConfig

Learn more about this warning here: https://fb.me/react-legacy-context

I saw in issue #170 you were still supporting React 15.6, so I understand you can't fix this just yet. This warning indicates react-avatar will not be compatible with React 17.x

@JorgenEvens
Copy link
Member

Hi @stahlmanDesign ,

The legacy context is still in there to support old version of React. However, when available the new context API will be used, so apart from the warning you should be fine.

Did you run into any actual issues due to this or were you just bringing the warning to my attention?

https://github.com/Sitebase/react-avatar/blob/98e982db333006fafe34ddd3366a14cc4b0459e0/src/context.js#L16-L26

@JorgenEvens JorgenEvens self-assigned this Jan 23, 2020
@JorgenEvens JorgenEvens added the incomplete Needs more info to resolve label Jan 23, 2020
@stahlmanDesign
Copy link
Author

Did you run into any actual issues due to this or were you just bringing the warning to my attention?

No problems, just bringing it to your attention for the future, thanks

@JorgenEvens
Copy link
Member

Hi @stahlmanDesign,

I've just released version v3.9.4 which only applies the legacy API after detecting whether the new context is available. The React warnings you've reported should no longer be shown after upgrading react-avatar.

@Muneem
Copy link

Muneem commented May 11, 2020

Perfect. Now we are not getting warning about it

@JorgenEvens
Copy link
Member

@Muneem Great! Thanks for confirming this fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incomplete Needs more info to resolve invalid
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants