Skip to content

Commit e3e3b47

Browse files
committed
Merge pull request #850 from spicyj/docs-ref-unmount
Document return value of unmountComponentAtNode
2 parents 0901149 + 87a9515 commit e3e3b47

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/docs/ref-01-top-level-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Configure React's event system to handle touch events on mobile devices.
3131
function createClass(object specification)
3232
```
3333

34-
Creates a component given a specification. A component implements a `render` method which returns **one single** child. That child may have an arbitrarily deep child structure. One thing that makes components different than standard prototypal classes is that you don't need to call new on them. They are convenience wrappers that construct backing instances (via new) for you.
34+
Create a component given a specification. A component implements a `render` method which returns **one single** child. That child may have an arbitrarily deep child structure. One thing that makes components different than standard prototypal classes is that you don't need to call new on them. They are convenience wrappers that construct backing instances (via new) for you.
3535

3636
For more information about the specification object, see [Component Specs and Lifecycle](/react/docs/component-specs.html).
3737

@@ -46,7 +46,7 @@ ReactComponent renderComponent(
4646
)
4747
```
4848

49-
Renders a React component into the DOM in the supplied `container`.
49+
Render a React component into the DOM in the supplied `container`.
5050

5151
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.
5252

@@ -56,10 +56,10 @@ If the optional callback is provided, it will be executed after the component is
5656
### React.unmountComponentAtNode
5757

5858
```javascript
59-
unmountComponentAtNode(DOMElement container)
59+
boolean unmountComponentAtNode(DOMElement container)
6060
```
6161

62-
Remove a mounted React component from the DOM and clean up its event handlers and state.
62+
Remove a mounted React component from the DOM and clean up its event handlers and state. If no component was mounted in the container, calling this function does nothing. Returns `true` if a component was unmounted and `false` if there was no component to unmount.
6363

6464
> Note:
6565
>

0 commit comments

Comments
 (0)