Add callback to setProps docs
Ben Alpert committed
Apr 2, 2014 at 15:01 UTC
2d66fc45185e98cfe11a824822ce44a90388cdeb
1 file changed
+3
-3
docs/docs/ref-02-component-api.md
+3
-3
@@ -24,10 +24,10 @@ If this component has been mounted into the DOM, this returns the corresponding
24
### setProps
25
26
```javascript
27
-setProps(object nextProps)
27
+setProps(object nextProps[, function callback])
28
```
29
30
-When you're integrating with an external JavaScript application you may want to signal a change to a React component rendered with `renderComponent()`. Simply call `setProps()` to change its properties and trigger a re-render.
30
+When you're integrating with an external JavaScript application you may want to signal a change to a React component rendered with `renderComponent()`. Simply call `setProps()` to change its properties and trigger a re-render. In addition, you can supply an optional callback function that is executed once `setProps` is completed.
31
32
> Note:
33
>
@@ -37,7 +37,7 @@ When you're integrating with an external JavaScript application you may want to
37
### replaceProps
38
39
```javascript
40
-replaceProps(object nextProps)
40
+replaceProps(object nextProps[, function callback])
41
```
42
43
Like `setProps()` but deletes any pre-existing props instead of merging the two objects.