Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.

Commit e251afb

Browse files
sjchmieladevelopit
authored andcommitted
Add unstable_batchedUpdates to exported functions (#411) (#289)
1 parent ad59cf3 commit e251afb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,10 @@ PureComponent.prototype.shouldComponentUpdate = function(props, state) {
591591
return shallowDiffers(this.props, props) || shallowDiffers(this.state, state);
592592
};
593593

594+
function unstable_batchedUpdates(callback) {
595+
callback();
596+
}
597+
594598
export {
595599
version,
596600
DOM,
@@ -607,8 +611,7 @@ export {
607611
Component,
608612
PureComponent,
609613
renderSubtreeIntoContainer as unstable_renderSubtreeIntoContainer,
610-
// this is a really old hidden react api, but something out there uses it
611-
// https://twitter.com/Joseph_Wynn/status/888046593286574085
614+
unstable_batchedUpdates,
612615
extend as __spread
613616
};
614617

@@ -628,5 +631,6 @@ export default {
628631
Component,
629632
PureComponent,
630633
unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer,
634+
unstable_batchedUpdates,
631635
__spread: extend
632636
};

0 commit comments

Comments
 (0)