diff --git a/src/core/ReactMount.js b/src/core/ReactMount.js index e98e2fbb01..b44fa7bc0f 100644 --- a/src/core/ReactMount.js +++ b/src/core/ReactMount.js @@ -318,7 +318,7 @@ var ReactMount = { container, shouldReuseMarkup ); - callback && callback(); + callback && callback.call(component); return component; }, diff --git a/src/core/ReactUpdates.js b/src/core/ReactUpdates.js index d866eec089..c1d92e1f29 100644 --- a/src/core/ReactUpdates.js +++ b/src/core/ReactUpdates.js @@ -102,7 +102,7 @@ function enqueueUpdate(component, callback) { if (!batchingStrategy.isBatchingUpdates) { component.performUpdateIfNecessary(); - callback && callback(); + callback && callback.call(component); return; }