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

React logs warnings since 16.8.6 when the config passed to withEffects does not contain a Context property #144

Closed
Nimelrian opened this issue Apr 24, 2019 · 0 comments · Fixed by #145

Comments

@Nimelrian
Copy link
Contributor

React 16.8.6 PR: facebook/react/pull/15226

The contextType of the WithEffects component created by withEffects is undefined and thus invalid when either no config object is passed to withEffects or the passed object does not contain a Context property.

public static contextType = config.Context

This causes React to log warnings in the console.

The contextType should only be set if the value in the config object is not undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant