:wave: In the Decompose + MviKotlin world, is it t...
# decompose
n
👋 In the Decompose + MviKotlin world, is it the correct approach to inject a lambda function from the Component into the Store for actions that should trigger a navigation event or send some output? Thanks!
a
Stores are usually retained via InstanceKeeper, so it may leak a component. There is a special concept for this - Labels. You can subscribe in your component and perform navigation as needed.
n
🤔 Ok, that will work. Since you only expose a set of Labels as Events to the UI, you can filter those.
Thank you
👍 1
You can add DisposableEffect(Unit) { onDispose {} } and log onDispose. It shouldn’t be called when you go back. Only called once when you go forward.
This is exactly what’s happening 😅 .
👍 1
Wrong thread, sorry!