mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Document React.addons.TestUtils.isElement()
This commit is contained in:
@@ -43,6 +43,14 @@ object mockComponent(function componentClass, string? mockTagName)
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
### isElement
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
boolean isElement(ReactElement element)
|
||||||
|
```
|
||||||
|
|
||||||
|
Returns true if `element` is any ReactElement.
|
||||||
|
|
||||||
### isElementOfType
|
### isElementOfType
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|||||||
Reference in New Issue
Block a user