Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/guides/migration-from-2-to-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@ expect(wrapper.ref('abc')).toBeInstanceOf(Box);
In our experience, this is most often what people would actually want and expect out of the `.ref(...)`
method.

To get the wrapper that was returned by enzyme 2:
```js
const wrapper = mount(<Bar />);
const refWrapper = wrapper.findWhere(n => n.instance() === wrapper.ref('abc'));
```

## With `mount`, `.instance()` can be called at any level of the tree

Expand Down