Skip to content

Commit 877da53

Browse files
authored
Merge pull request #106 from annuhdo/update-doc-mockComponent
Update site's doc mockComponent()
2 parents 7060923 + b6e2f24 commit 877da53

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

content/docs/addons-test-utils.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ mockComponent(
112112

113113
Pass a mocked component module to this method to augment it with useful methods that allow it to be used as a dummy React component. Instead of rendering as usual, the component will become a simple `<div>` (or other tag if `mockTagName` is provided) containing any provided children.
114114

115+
> Note:
116+
>
117+
> `mockComponent()` is a legacy API. We recommend using [shallow rendering](/docs/test-utils.html#shallow-rendering) or [jest.mock()](https://facebook.github.io/jest/docs/en/tutorial-react-native.html#mock-native-modules-using-jestmock) instead.
118+
115119
* * *
116120

117121
### `isElement()`

0 commit comments

Comments
 (0)