diff --git a/docs/10.4-test-utils.md b/docs/10.4-test-utils.md index 2eec1d23..40f22780 100644 --- a/docs/10.4-test-utils.md +++ b/docs/10.4-test-utils.md @@ -43,13 +43,13 @@ 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 `
` (or other tag if `mockTagName` is provided) containing any provided children. -### isDescriptorOfType +### isElementOfType ```javascript -boolean isDescriptorOfType(ReactDescriptor descriptor, function componentClass) +boolean isElementOfType(ReactElement element, function componentClass) ``` -Returns true if `descriptor` is an instance of a React `componentClass`. +Returns true if `element` is a ReactElement whose type is of a React `componentClass`. ### isDOMComponent diff --git a/docs/ref-01-top-level-api.md b/docs/ref-01-top-level-api.md index 46544c1f..fa1923a7 100644 --- a/docs/ref-01-top-level-api.md +++ b/docs/ref-01-top-level-api.md @@ -26,15 +26,15 @@ For more information about the specification object, see [Component Specs and Li ```javascript ReactComponent render( - ReactComponent component, + ReactElement element, DOMElement container, [function callback] ) ``` -Render a React component into the DOM in the supplied `container` and return a reference to the component. +Render a ReactElement into the DOM in the supplied `container` and return a reference to the component. -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. +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. If the optional callback is provided, it will be executed after the component is rendered or updated. @@ -73,22 +73,14 @@ string renderToStaticMarkup(ReactComponent component) 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. -### React.isValidClass -```javascript -boolean isValidClass(* factory) -``` - -Verifies the factory is a React class descriptor. See `React.createClass`. - - -### React.isValidComponent +### React.isValidElement ```javascript -boolean isValidComponent(* object) +boolean isValidElement(* object) ``` -Verifies the object is a React component descriptor. +Verifies the object is a ReactElement. ### React.DOM diff --git a/tips/16-references-to-components.md b/tips/16-references-to-components.md index e7222956..83d39ad0 100644 --- a/tips/16-references-to-components.md +++ b/tips/16-references-to-components.md @@ -13,14 +13,14 @@ If you're using React components in a larger non-React application or transition var myComponent = React.render(, myContainer); ``` -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. +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. ```js -var myComponent = ; // This is just a descriptor. +var myComponentElement = ; // This is just a ReactElement. // Some code here... -myComponent = React.render(myComponent, myContainer); +var myComponentInstance = React.render(myComponentElement, myContainer); ``` > Note: