Skip to content

Commit

Permalink
Add checkpoint/rollback to ReactNativeReconcileTransaction (#7619)
Browse files Browse the repository at this point in the history
  • Loading branch information
millermedeiros authored and sophiebits committed Aug 30, 2016
1 parent c85f463 commit 51f04fd
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 51f04fd

Please sign in to comment.