-
Circuit is returning the State value of the screen from the Presenter. If the State contains an Effect, it seems that the Effect may be executed repeatedly rather than once in a situation such as recomposition (such as a Toast appearing multiple times). In that case, how do you handle things like Effects? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You essentially acknowledged it in your description - if it's in state, it'll repeat. As such, effects aren't part of state :). There's two things you're asking about — effects and transitions. Effects are implemented like other compose effects, we even have an effects extension artifact with one for toasts here. Transitions are done with Compose's native transition APIs and we have docs here. |
Beta Was this translation helpful? Give feedback.
You essentially acknowledged it in your description - if it's in state, it'll repeat. As such, effects aren't part of state :).
There's two things you're asking about — effects and transitions.
Effects are implemented like other compose effects, we even have an effects extension artifact with one for toasts here.
Transitions are done with Compose's native transition APIs and we have docs here.