You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for developing this fantastic library. I’d like to use circuit-retained with Jetpack Navigation (or JetBrains Compose Multiplatform Navigation) without needing to set up a composition local for rememberRetained{}. Is this possible, or could you provide guidance on how to achieve this?
The text was updated successfully, but these errors were encountered:
takahirom
changed the title
Sample or Integration Implementation using circuit-retained with Jetpack Navigation (or JetBrains Compose Multiplatform Navigation)
Enable circuit-retained without composition local setup
Sep 20, 2024
takahirom
changed the title
Enable circuit-retained without composition local setup
Enable circuit-retained without composition local manual setup
Sep 20, 2024
I think this would be possible. Would need to pull something together to setup a multi-platform continuity instance as a default. Wouldn't necessarily want to do that setup at each retained use though 🤔
Think at a minimum we should add a RetainedCompositionLocals. Like the CircuitCompositionLocals we have in foundation that sets up the continuity registry for circuit. Would make it easier to use retained on it's own.
Curious whats the limitation around setting up a composition local, or adding a RetainedCompositionLocals, for this at the root level?
I think managing the backstack might be challenging if only one composition local is provided. It might be beneficial if we could use ViewModels and Lifecycles from Compose Multiplatform instead of relying on the current composition local to achieve smooth integration, assuming they do not already exist. However, this approach may be very complex.
Ahh so specifically an integration with Jetpack/Compose Navigation where the view model store is setup per route. We're doing something similar in NavigableCircuitContent for the LocalRetainedStateRegistry.
Could be doable, let folks provide a default instead of the NoOpRetainedStateRegistry 🤔 Involves some sort of a factory which would default to using a multi-platform continuity.
This would be assuming a lot about the lifecycle, which I think ties this down to being a very Jetpack Navigation specific change.
Thank you for developing this fantastic library. I’d like to use circuit-retained with Jetpack Navigation (or JetBrains Compose Multiplatform Navigation) without needing to set up a composition local for rememberRetained{}. Is this possible, or could you provide guidance on how to achieve this?
The text was updated successfully, but these errors were encountered: