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 1 commit into from Apr 5, 2019


None yet
2 participants
Copy link

ooHmartY commented Apr 5, 2019


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.


ljharb approved these changes Apr 5, 2019

Copy link

ljharb left a comment


@ljharb ljharb force-pushed the ooHmartY:invariant_fix_react_16_8_4 branch from f6aef24 to b6f5b51 Apr 5, 2019

@ljharb ljharb merged commit b6f5b51 into airbnb:master Apr 5, 2019

1 of 2 checks passed

coverage/coveralls Coverage decreased (-0.02%) to 91.653%
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.

Copy link
Contributor Author

ooHmartY commented Apr 5, 2019

No problem - thank you for the quick merge :D

@ooHmartY ooHmartY deleted the ooHmartY:invariant_fix_react_16_8_4 branch Apr 5, 2019

ljharb added a commit that referenced this pull request Apr 6, 2019

[enzyme-adapter-react-16] v1.12.0
 - [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
You can’t perform that action at this time.