-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Effects that dont change state #129
Comments
Why do we need the explicit |
@gabrielittner you mean why it would not just return |
More like, why does the lambda need to return anything at all? |
Hm, maybe I misunderstand you but what is the signature of such a lambda? What would you propose (can you give an example)? |
The signature would still be
Effectively the same, I guess I was just confused by the explicit |
👍 got it. Then we are talking about the same thing |
At the moment you cannot do a piece of work without the need of returning a
ChangeState
object.This proposal is about adding "effects". A typical use case for an Effect is triggering navigation without changing the state of the statemachine itself or doing some analytics tracking calls.
Proposed Syntax
Specs:
onEnterEffect
issuspend (State) -> Unit
withContext(NonCancelable)
The text was updated successfully, but these errors were encountered: