We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ref(refName)
1 parent 7869527 commit 38acea4Copy full SHA for 38acea4
docs/guides/migration-from-2-to-3.md
@@ -391,6 +391,11 @@ expect(wrapper.ref('abc')).toBeInstanceOf(Box);
391
In our experience, this is most often what people would actually want and expect out of the `.ref(...)`
392
method.
393
394
+To get the wrapper that was returned by enzyme 2:
395
+```js
396
+const wrapper = mount(<Bar />);
397
+const refWrapper = wrapper.findWhere(n => n.instance() === wrapper.ref('abc'));
398
+```
399
400
## With `mount`, `.instance()` can be called at any level of the tree
401
0 commit comments