@samitouri / QOS-React-2 / commits / 1cb3f25e78

More Descriptor -> Element renames

Sebastian Markbage committed Oct 27, 2014 at 22:28 UTC 1cb3f25e780847abd449e9bfe962fb48a4dad65e
3 files changed +12 -20
docs/docs/10.4-test-utils.md
+3 -3
@@ -43,13 +43,13 @@ object mockComponent(function componentClass, string? mockTagName)
43
44 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.
45
46 -### isDescriptorOfType
46 +### isElementOfType
47
48 ```javascript
49 -boolean isDescriptorOfType(ReactDescriptor descriptor, function componentClass)
49 +boolean isElementOfType(ReactElement element, function componentClass)
50 ```
51
52 -Returns true if `descriptor` is an instance of a React `componentClass`.
52 +Returns true if `element` is a ReactElement whose type is of a React `componentClass`.
53
54 ### isDOMComponent
55
docs/docs/ref-01-top-level-api.md
+6 -14
@@ -26,15 +26,15 @@ For more information about the specification object, see [Component Specs and Li
26
27 ```javascript
28 ReactComponent render(
29 - ReactComponent component,
29 + ReactElement element,
30 DOMElement container,
31 [function callback]
32 )
33 ```
34
35 -Render a React component into the DOM in the supplied `container` and return a reference to the component.
35 +Render a ReactElement into the DOM in the supplied `container` and return a reference to the component.
36
37 -If the React component was previously rendered into `container`, this will perform an update on it and only mutate the DOM as necessary to reflect the latest React component.
37 +If the ReactElement was previously rendered into `container`, this will perform an update on it and only mutate the DOM as necessary to reflect the latest React component.
38
39 If the optional callback is provided, it will be executed after the component is rendered or updated.
40
@@ -73,22 +73,14 @@ string renderToStaticMarkup(ReactComponent component)
73
74 Similar to `renderToString`, except this doesn't create extra DOM attributes such as `data-react-id`, that React uses internally. This is useful if you want to use React as a simple static page generator, as stripping away the extra attributes can save lots of bytes.
75
76 -### React.isValidClass
76
78 -```javascript
79 -boolean isValidClass(* factory)
80 -```
81 -
82 -Verifies the factory is a React class descriptor. See `React.createClass`.
83 -
84 -
85 -### React.isValidComponent
77 +### React.isValidElement
78
79 ```javascript
88 -boolean isValidComponent(* object)
80 +boolean isValidElement(* object)
81 ```
82
91 -Verifies the object is a React component descriptor.
83 +Verifies the object is a ReactElement.
84
85
86 ### React.DOM
docs/tips/16-references-to-components.md
+3 -3
@@ -13,14 +13,14 @@ If you're using React components in a larger non-React application or transition
13 var myComponent = React.render(<MyComponent />, myContainer);
14 ```
15
16 -Keep in mind, however, that the "constructor" of a component doesn't return a component instance! It's just a **descriptor**: a lightweight representation that tells React what the mounted component should look like.
16 +Keep in mind, however, that the JSX doesn't return a component instance! It's just a **ReactElement**: a lightweight representation that tells React what the mounted component should look like.
17
18 ```js
19 -var myComponent = <MyComponent />; // This is just a descriptor.
19 +var myComponentElement = <MyComponent />; // This is just a ReactElement.
20
21 // Some code here...
22
23 -myComponent = React.render(myComponent, myContainer);
23 +var myComponentInstance = React.render(myComponentElement, myContainer);
24 ```
25
26 > Note: