This would essentially allow one to "rollback" mutations to a certain path. For optimistic UIs this means we'd be able to easily rollback UI changes upon API request failures:
Subscribers would receive a restore function as the third argument, to be called with the previous value of the mutated node, returning the restored node allowing further method chaining.
This would essentially allow one to "rollback" mutations to a certain path. For optimistic UIs this means we'd be able to easily rollback UI changes upon API request failures:
Subscribers would receive a
restore
function as the third argument, to be called with the previous value of the mutated node, returning the restored node allowing further method chaining.