Add checkpoint/rollback to ReactNativeReconcileTransaction (#7619)

(cherry picked from commit 51f04fdbc1)
This commit is contained in:
Miller Medeiros
2016-09-15 16:32:45 -07:00
committed by Paul O’Shannessy
parent 3e47b3002b
commit 2927c4ce76
@@ -97,6 +97,19 @@ var Mixin = {
return ReactUpdateQueue;
},
/**
* Save current transaction state -- if the return value from this method is
* passed to `rollback`, the transaction will be reset to that state.
*/
checkpoint: function() {
// reactMountReady is the our only stateful wrapper
return this.reactMountReady.checkpoint();
},
rollback: function(checkpoint) {
this.reactMountReady.rollback(checkpoint);
},
/**
* `PooledClass` looks for this, and will invoke this before allowing this
* instance to be reused.