Skip to content

[enzyme-adapter-react-16] [fix] Find memo components by constructor#2081

Merged
ljharb merged 1 commit intoenzymejs:masterfrom
eps1lon:test/memo-find
Apr 3, 2019
Merged

[enzyme-adapter-react-16] [fix] Find memo components by constructor#2081
ljharb merged 1 commit intoenzymejs:masterfrom
eps1lon:test/memo-find

Conversation

@eps1lon
Copy link
Copy Markdown
Contributor

@eps1lon eps1lon commented Apr 3, 2019

Follow up on 4149a21 which attempted to fix #2038. The fix was not working for the scenario described in #2038 (comment).

This PR adds a test for the scenario above and fixes that issue.

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, this is excellent and much appreciated.

@ljharb ljharb merged commit 3045286 into enzymejs:master Apr 3, 2019
@eps1lon eps1lon deleted the test/memo-find branch April 3, 2019 22:02
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.

Cannot find a function component wrapped with React.memo HOC

2 participants