A ValidatingStore is a Store which also contains a Validation for its model and by default applies it to every update.
This store is intentionally configured to validate the data on each update, that is why the validateAfterUpdate parameter is set to
true by default.
There might be special situations where it is reasonable to disable this behaviour by setting validateAfterUpdate to
false and to prefer applying the validation individually within custom handlers, for example if a model should only be validated after the user has completed his input or if metadata is needed for the validation process. Then be aware of the fact, that the call of the validate function actually updates the messages already.
If the new data is not passed to the store's state after validating it, the messages are probably out of sync with the actual store's state! This could lead to false assumptions and might produce hard to detect bugs in your application.
Factory method to create a SimpleHandler that does not take an Action
Factory method to create a SimpleHandler mapping the actual value of the Store and a given Action to a new value.
factory method to create an EmittingHandler that does not take an action in it's execute-lambda.
Factory method to create a EmittingHandler taking an action-value and the current store value to derive the new value. An EmittingHandler is a Flow by itself and can therefore be connected to other SimpleHandlers even in other Stores.
Connects a Flow to a Handler.
Connects a Flow to a suspendable execute function.
a simple SimpleHandler that just takes the given action-value as the new value for the Store.
on a Store of nullable data this creates a Store with a nullable parent and non-nullable value. It can be called using a Lens on a non-nullable parent (that can be created by using the @Lenses-annotation), but you have to ensure, that the resulting Store is never used, when it's parent's value is null. Otherwise, a NullPointerException is thrown.
on a Store of nullable data this creates a Store with a nullable parent and non-nullable value. It can be called using a Lens on a non-nullable parent (that can be created by using the @Lenses-annotation), but you have to provide a default value. When updating the value of the resulting Store to this default value, null is used instead updating the parent. When this Store's value would be null according to it's parent's value, the default value will be used instead.
Finds all corresponding ValidationMessages to this Store.