Module Expert.Snapshot
The underlying representations of Bonsai components. This module is provided "as is", without warranty of any kind, express or implied...
module Event : Core_kernel.T
A Snapshot represents the state of a component at an instant in time.
val apply_action : ('model, 'action, _) t -> schedule_event:(Event.t -> unit) -> 'action -> 'model
Applies the provided action to the model in force at the time that the snapshot was created.
The application of the action is allowed to engage in side-effecting computations, including calling the
schedule_action
function to request that further actions be enqueued to be applied to the model.
val result : (_, _, 'result) t -> 'result
The result of a component is the primary value computed by the component in question. At the toplevel of a UI, this is generally a representation of the view, but it's often useful to compute other kinds of results in inner components.