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

fix invariant violation in provider #2083

Merged
merged 1 commit into from
Apr 5, 2019

Conversation

ooHmartY
Copy link
Contributor

@ooHmartY ooHmartY commented Apr 5, 2019

Hello!

I'm running into an issue when using the latest version of react.

Invariant Violation: Provider(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.

Turns out the context provider in deterctFiberTags needs to return a value.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ljharb ljharb force-pushed the invariant_fix_react_16_8_4 branch from f6aef24 to b6f5b51 Compare April 5, 2019 06:21
@ljharb ljharb merged commit b6f5b51 into enzymejs:master Apr 5, 2019
@ooHmartY
Copy link
Contributor Author

ooHmartY commented Apr 5, 2019

No problem - thank you for the quick merge :D

@ooHmartY ooHmartY deleted the invariant_fix_react_16_8_4 branch April 5, 2019 18:31
ljharb added a commit that referenced this pull request Apr 6, 2019
 - [new] Add support for wrapping `Profiler` (#2055)
 - [new] support shallow rendering `createContext()` providers and consumers  - add `isContextConsumer`, `getProviderFromConsumer` (#1966)
 - [new] add `wrapWithWrappingComponent`, `isCustomComponent` (#1960)
 - [new] add `getDerivedStateFromError` support (#2036)
 - [fix] avoid invariant violation in provider (#2083)
 - [fix] properly fix finding memo(SFC) components (#2081)
 - [fix] properly render memoized SFCs
 - [fix] `shallow`: avoid wrapping component for hooks
 - [deps] update `react-is`
 - [dev deps] update `eslint`
 - [refactor] use `react-is` predicates more
 - [build] include source maps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants