Skip to content

fix invariant violation in provider#2083

Merged
ljharb merged 1 commit intoenzymejs:masterfrom
ooHmartY:invariant_fix_react_16_8_4
Apr 5, 2019
Merged

fix invariant violation in provider#2083
ljharb merged 1 commit intoenzymejs:masterfrom
ooHmartY:invariant_fix_react_16_8_4

Conversation

@ooHmartY
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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