mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Add checkpoint/rollback to ReactNativeReconcileTransaction (#7619)
(cherry picked from commit 51f04fdbc1)
This commit is contained in:
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.
|
||||
|
||||
Reference in New Issue
Block a user