Add checkpoint/rollback to ReactNativeReconcileTransaction (#7619)

This commit is contained in:
Miller Medeiros
2016-08-30 15:42:36 -07:00
committed by Ben Alpert
parent c85f46320e
commit 51f04fdbc1
@@ -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.