-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Cannot find a function component wrapped with React.memo HOC #2038
Copy link
Copy link
Closed
Labels
Description
Current behavior
When trying to .find a memoized function component within a mounted tree and .debug it, returns an empty string.
This is regarding the new React.memo feature. When I simply remove the React.memo wrapper from the component, then it is found and its contents printed to the console on .debug. With the wrapper, it appears the component cannot be found.
Expected behavior
Should output the component.
Your environment
Windows 10, GitBash, Jest
API
- [x ] mount
Version
| library | version |
|---|---|
| enzyme | 3.9.0 |
| react | 16.8.3 |
| react-dom | 16.8 |
| react-test-renderer | 16.8.4 |
| adapter (below) | 1.10.0 |
Adapter
- [x ] enzyme-adapter-react-16
Reactions are currently unavailable