Replies: 1 comment
-
|
Thanks for the report. I've opened up skiptools/skip-ui#274 for this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Expected Behavior (SwiftUI)
In native SwiftUI, changing a view’s
.idvalue forces SwiftUI to treat the view as a new instance.This causes a full teardown and recreation of the view, resetting any
@Statewithin it.Actual Behavior (SkipUI)
In SkipUI (Android), changing the
.iddoes not cause the view to remount.Internal state persists and the subtree is not recreated.
Minimal Example
If fixing this behavior is possible, that would be ideal. If not, adding a note to the README.md (or SkipUI docs) explaining the limitation would be nice. For now I’m using a small hack (showing a 1-second loading screen) to force a refresh (so its not urgent).
Thanks,
Ajay
Beta Was this translation helpful? Give feedback.
All reactions