Import findCurrentFiberUsingSlowPath from react-reconciler/reflection#1399
Import findCurrentFiberUsingSlowPath from react-reconciler/reflection#1399ljharb merged 2 commits intoenzymejs:masterfrom
Conversation
22c5221 to
a666fc6
Compare
a666fc6 to
441a1af
Compare
- [Deps] update `prop-types`, `enzyme-adapter-utils` - [Dev Deps] update `eslint`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react` - [Refactor] Import findCurrentFiberUsingSlowPath from react-reconciler/reflection (enzymejs#1399)
- [Deps] update `prop-types`, `enzyme-adapter-utils` - [Dev Deps] update `eslint`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react` - [Refactor] Import findCurrentFiberUsingSlowPath from react-reconciler/reflection (enzymejs#1399)
|
Hmm. I'm not sure this is right.
|
|
Thanks for clarifying @gaearon, I can revert. The fact that so much code needs to be duplicated in the adapter is a strong indicator that the |
|
I agree, open to suggestions how to fix those :-) There was a proposal from Enzyme side for us to expose toTree in the test renderer. But even that didn’t end up being used. We’re totally open to Enzyme taking more ownership over this (and potentially exposing toTree on ReactDOM in some special testing mode), but we should probably start “blessed” integration from the test renderer. |
- [Deps] update `prop-types`, `enzyme-adapter-utils` - [Dev Deps] update `eslint`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react` - [Refactor] Import findCurrentFiberUsingSlowPath from react-reconciler/reflection (enzymejs#1399)
|
We're beginning to bump into problems caused by this at Facebook. Specifically, we've changed some internal constants, but we have to remember to fork both the Enzyme adapter and this deep dependency that we don't normally check in. It would be great to undo this abstraction as soon as possible. |
react-reconcilernow exposesReactFiberTreeReflectionviareact-reconciler/reflection. That means we can importfindCurrentFiberUsingSlowPathfrom the official reconciler package and remove our copy-pasted version 🎉