@@ -42,7 +42,7 @@ describe('ReactUpdates', () => {
4242 var instance = ReactTestUtils . renderIntoDocument ( < Component /> ) ;
4343 expect ( instance . state . x ) . toBe ( 0 ) ;
4444
45- ReactUpdates . batchedUpdates ( function ( ) {
45+ ReactDOM . unstable_batchedUpdates ( function ( ) {
4646 instance . setState ( { x : 1 } ) ;
4747 instance . setState ( { x : 2 } ) ;
4848 expect ( instance . state . x ) . toBe ( 0 ) ;
@@ -72,7 +72,7 @@ describe('ReactUpdates', () => {
7272 expect ( instance . state . x ) . toBe ( 0 ) ;
7373 expect ( instance . state . y ) . toBe ( 0 ) ;
7474
75- ReactUpdates . batchedUpdates ( function ( ) {
75+ ReactDOM . unstable_batchedUpdates ( function ( ) {
7676 instance . setState ( { x : 1 } ) ;
7777 instance . setState ( { y : 2 } ) ;
7878 expect ( instance . state . x ) . toBe ( 0 ) ;
@@ -105,7 +105,7 @@ describe('ReactUpdates', () => {
105105 expect ( instance . props . x ) . toBe ( 0 ) ;
106106 expect ( instance . state . y ) . toBe ( 0 ) ;
107107
108- ReactUpdates . batchedUpdates ( function ( ) {
108+ ReactDOM . unstable_batchedUpdates ( function ( ) {
109109 ReactDOM . render ( < Component x = { 1 } /> , container ) ;
110110 instance . setState ( { y : 2 } ) ;
111111 expect ( instance . props . x ) . toBe ( 0 ) ;
@@ -152,7 +152,7 @@ describe('ReactUpdates', () => {
152152 expect ( instance . state . x ) . toBe ( 0 ) ;
153153 expect ( child . state . y ) . toBe ( 0 ) ;
154154
155- ReactUpdates . batchedUpdates ( function ( ) {
155+ ReactDOM . unstable_batchedUpdates ( function ( ) {
156156 instance . setState ( { x : 1 } ) ;
157157 child . setState ( { y : 2 } ) ;
158158 expect ( instance . state . x ) . toBe ( 0 ) ;
@@ -201,7 +201,7 @@ describe('ReactUpdates', () => {
201201 expect ( instance . state . x ) . toBe ( 0 ) ;
202202 expect ( child . state . y ) . toBe ( 0 ) ;
203203
204- ReactUpdates . batchedUpdates ( function ( ) {
204+ ReactDOM . unstable_batchedUpdates ( function ( ) {
205205 child . setState ( { y : 2 } ) ;
206206 instance . setState ( { x : 1 } ) ;
207207 expect ( instance . state . x ) . toBe ( 0 ) ;
@@ -237,7 +237,7 @@ describe('ReactUpdates', () => {
237237 expect ( instance . state . x ) . toBe ( 0 ) ;
238238
239239 var innerCallbackRun = false ;
240- ReactUpdates . batchedUpdates ( function ( ) {
240+ ReactDOM . unstable_batchedUpdates ( function ( ) {
241241 instance . setState ( { x : 1 } , function ( ) {
242242 instance . setState ( { x : 2 } , function ( ) {
243243 expect ( this ) . toBe ( instance ) ;
@@ -281,7 +281,7 @@ describe('ReactUpdates', () => {
281281 expect ( instance . state . x ) . toBe ( 0 ) ;
282282
283283 var callbacksRun = 0 ;
284- ReactUpdates . batchedUpdates ( function ( ) {
284+ ReactDOM . unstable_batchedUpdates ( function ( ) {
285285 instance . setState ( { x : 1 } , function ( ) {
286286 callbacksRun ++ ;
287287 } ) ;
@@ -330,14 +330,14 @@ describe('ReactUpdates', () => {
330330 expect ( parentRenderCount ) . toBe ( 1 ) ;
331331 expect ( childRenderCount ) . toBe ( 1 ) ;
332332
333- ReactUpdates . batchedUpdates ( function ( ) {
333+ ReactDOM . unstable_batchedUpdates ( function ( ) {
334334 instance . setState ( { x : 1 } ) ;
335335 } ) ;
336336
337337 expect ( parentRenderCount ) . toBe ( 1 ) ;
338338 expect ( childRenderCount ) . toBe ( 1 ) ;
339339
340- ReactUpdates . batchedUpdates ( function ( ) {
340+ ReactDOM . unstable_batchedUpdates ( function ( ) {
341341 instance . refs . child . setState ( { x : 1 } ) ;
342342 } ) ;
343343
@@ -465,7 +465,7 @@ describe('ReactUpdates', () => {
465465 function testUpdates ( components , desiredWillUpdates , desiredDidUpdates ) {
466466 var i ;
467467
468- ReactUpdates . batchedUpdates ( function ( ) {
468+ ReactDOM . unstable_batchedUpdates ( function ( ) {
469469 for ( i = 0 ; i < components . length ; i ++ ) {
470470 triggerUpdate ( components [ i ] ) ;
471471 }
@@ -475,7 +475,7 @@ describe('ReactUpdates', () => {
475475
476476 // Try them in reverse order
477477
478- ReactUpdates . batchedUpdates ( function ( ) {
478+ ReactDOM . unstable_batchedUpdates ( function ( ) {
479479 for ( i = components . length - 1 ; i >= 0 ; i -- ) {
480480 triggerUpdate ( components [ i ] ) ;
481481 }
@@ -519,15 +519,15 @@ describe('ReactUpdates', () => {
519519 var containerB = document . createElement ( 'div' ) ;
520520
521521 // Initial renders aren't batched together yet...
522- ReactUpdates . batchedUpdates ( function ( ) {
522+ ReactDOM . unstable_batchedUpdates ( function ( ) {
523523 ReactDOM . render ( < Component text = "A1" /> , containerA ) ;
524524 ReactDOM . render ( < Component text = "B1" /> , containerB ) ;
525525 } ) ;
526526 expect ( ReconcileTransaction . getPooled . calls . count ( ) ) . toBe ( 2 ) ;
527527
528528 // ...but updates are! Here only one more transaction is used, which means
529529 // we only have to initialize and close the wrappers once.
530- ReactUpdates . batchedUpdates ( function ( ) {
530+ ReactDOM . unstable_batchedUpdates ( function ( ) {
531531 ReactDOM . render ( < Component text = "A2" /> , containerA ) ;
532532 ReactDOM . render ( < Component text = "B2" /> , containerB ) ;
533533 } ) ;
@@ -568,7 +568,7 @@ describe('ReactUpdates', () => {
568568 a = ReactTestUtils . renderIntoDocument ( < A /> ) ;
569569 b = ReactTestUtils . renderIntoDocument ( < B /> ) ;
570570
571- ReactUpdates . batchedUpdates ( function ( ) {
571+ ReactDOM . unstable_batchedUpdates ( function ( ) {
572572 a . setState ( { x : 1 } ) ;
573573 b . setState ( { x : 1 } ) ;
574574 } ) ;
@@ -679,7 +679,7 @@ describe('ReactUpdates', () => {
679679
680680 expect ( updates ) . toEqual ( [ 0 , 1 , 2 ] ) ;
681681
682- ReactUpdates . batchedUpdates ( function ( ) {
682+ ReactDOM . unstable_batchedUpdates ( function ( ) {
683683 // Simulate update on each component from top to bottom.
684684 instances . forEach ( function ( instance ) {
685685 instance . forceUpdate ( ) ;
@@ -771,7 +771,7 @@ describe('ReactUpdates', () => {
771771 }
772772 }
773773
774- ReactUpdates . batchedUpdates ( function ( ) {
774+ ReactDOM . unstable_batchedUpdates ( function ( ) {
775775 ReactTestUtils . renderIntoDocument (
776776 < div >
777777 < A />
@@ -837,7 +837,7 @@ describe('ReactUpdates', () => {
837837
838838 var component = ReactTestUtils . renderIntoDocument ( < A /> ) ;
839839
840- ReactUpdates . batchedUpdates ( function ( ) {
840+ ReactDOM . unstable_batchedUpdates ( function ( ) {
841841 // B will have scheduled an update but the batching should ensure that its
842842 // update never fires.
843843 componentB . setState ( { updates : 1 } ) ;
0 commit comments