Browse Source

Make ReactTextComponent properly injectable

ReactTextComponent's implementation is DOM-specific; instead of flattenChildren creating the ReactTextComponent instances, ReactNativeComponent now takes care of having ReactTextComponent injected and creating the component instance. I also renamed ReactTextComponent to ReactDOMTextComponent and moved it to browser/ui/ where it belongs. ReactDOMTextComponent no longer inherits directly from ReactComponent and instead implements construct and {mount,receive,unmount}Component directly.

This diff removes `ReactTestUtils.isTextComponent` which should have previously never returned true when using public APIs.

Test Plan: jest, use ballmer-peak example.
main
Ben Alpert 10 years ago
parent
commit
09f1d04981
  1. 8
      docs/10.4-test-utils.md

8
docs/10.4-test-utils.md

@ -75,14 +75,6 @@ boolean isCompositeComponentWithType(ReactComponent instance, function component
Returns true if `instance` is a composite component (created with `React.createClass()`) whose type is of a React `componentClass`.
### isTextComponent
```javascript
boolean isTextComponent(ReactComponent instance)
```
Returns true if `instance` is a plain text component.
### findAllInRenderedTree
```javascript

Loading…
Cancel
Save