rebuild abstract method

void rebuild([
  1. void sideEffectMutation(
    1. void cancelRebuild()
    )?
])

Triggers a rebuild in the supplied capsule.

The supplied sideEffectMutation will be called with a void Function() argument that can be invoked from within the sideEffectMutation to cancel the rebuild (say, if the side effect state doesn't need to change).

Implementation

void rebuild([
  void Function(void Function() cancelRebuild)? sideEffectMutation,
]);