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
I've discovered that issue #1285 appears to not be fully resolved for the resetRoot case, despite PR #1331 fixing the goTo scenario. The issue occurs where rememberRetained state is lost during rapid tab switching (around 300ms intervals) when using resetRoot.
Example:
var isLoading by rememberRetained { mutableStateOf(true) }
// after some operation, I change `isLoading` to false// but on rapid resetRoot, the state is lost and `isLoading` is reset to true
Current behavior:
When switching tabs at normal speed: retained state restored correctly
During rapid tab switching: retained state resets to initial value
(e.g., if isLoading was set to false, it resets back to true)
While the repo uses color changes to visualize the issue, the underlying problem is about retained state being lost.
Has anyone encountered this issue and found a workaround for maintaining retained state during rapid navigation?
This could be problematic in production apps where losing retained state affects user experience.
Looking forward to any suggestions from the community.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi community,
I've discovered that issue #1285 appears to not be fully resolved for the
resetRoot
case, despite PR #1331 fixing thegoTo
scenario. The issue occurs whererememberRetained
state is lost during rapid tab switching (around 300ms intervals) when usingresetRoot
.Example:
Current behavior:
(e.g., if isLoading was set to false, it resets back to true)
You can reproduce this using the test repo:
https://github.com/mkowol-n/SlackNavIssue with Circuit version 0.25.0.
While the repo uses color changes to visualize the issue, the underlying problem is about retained state being lost.
Has anyone encountered this issue and found a workaround for maintaining retained state during rapid navigation?
This could be problematic in production apps where losing retained state affects user experience.
Looking forward to any suggestions from the community.
Beta Was this translation helpful? Give feedback.
All reactions