This diff outlines how we would use a separate MutableSharedFlow for Effects which emit from the presenter back to the view. In the previous login example, we were keying off a view model to navigate, which was persisting on back. This led to unintended behavior when coming back from the next screen.
Effects here act as transient state. The presenter shouts and the view responds, but doesn't persist state. We can also use this for things like Snackbars/Toast.
Hi Mike,
This diff outlines how we would use a separate
MutableSharedFlow
forEffects
which emit from the presenter back to the view. In the previous login example, we were keying off a view model to navigate, which was persisting on back. This led to unintended behavior when coming back from the next screen.Effects here act as transient state. The presenter shouts and the view responds, but doesn't persist state. We can also use this for things like Snackbars/Toast.
This also fixes https://github.com/dropbox/kaiken/issues/133