From cb05a303609dcf079c0f0d533adef1f1765e18f5 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Wed, 2 Apr 2014 15:01:39 -0700 Subject: [PATCH] Add callback to setProps docs --- docs/ref-02-component-api.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ref-02-component-api.md b/docs/ref-02-component-api.md index a3cfebfa..962de2e0 100644 --- a/docs/ref-02-component-api.md +++ b/docs/ref-02-component-api.md @@ -24,10 +24,10 @@ If this component has been mounted into the DOM, this returns the corresponding ### setProps ```javascript -setProps(object nextProps) +setProps(object nextProps[, function callback]) ``` -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. +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. > Note: > @@ -37,7 +37,7 @@ When you're integrating with an external JavaScript application you may want to ### replaceProps ```javascript -replaceProps(object nextProps) +replaceProps(object nextProps[, function callback]) ``` Like `setProps()` but deletes any pre-existing props instead of merging the two objects.