Skip to content

Commit

Permalink
Add checkpoint/rollback to ReactNativeReconcileTransaction (#7619)
Browse files Browse the repository at this point in the history
(cherry picked from commit 51f04fd)
  • Loading branch information
millermedeiros authored and zpao committed Sep 15, 2016
1 parent 3e47b30 commit 2927c4c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/renderers/native/ReactNativeReconcileTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2927c4c

Please sign in to comment.