Skip to content

Commit a576621

Browse files
yimingheljharb
authored andcommitted
[readme] common-issues: use invoke prop
1 parent f143877 commit a576621

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/common-issues.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ More details and motivation can be found at [migration from 2 to 3: Calling prop
3939
Instead of storing `.find()` results into a local variable, re-find from the root after any change.
4040

4141
```jsx
42-
wrapper.find('button').props().onClick();
42+
wrapper.find('button').invoke('onClick')();
4343
expect(wrapper.find('input').prop('value')).to.equal('test');
4444
```
4545

@@ -52,7 +52,7 @@ function getButton(wrapper) {
5252

5353
//
5454

55-
getButton(wrapper).prop('onClick')();
55+
getButton(wrapper).invoke('onClick')();
5656
```
5757

5858
### Testing third party libraries

0 commit comments

Comments
 (0)