I tried the first suggestion from robnotyou, and it seems to work without any unpleasant side effect. After voting it as the answer, the system won't let me also choose the other answer from Claude31.
I've studied Claude31's answer and the info at the other thread, and I see it addresses my situation exactly. It was good to study to understand why my error happens in the first place, even if I don't yet fully understand this intricacy yet. I do want to ask: since the first solution is a lot simpler, does it risk any bad side effects somewhere along the line? I mean, why implement a stateful preview wrapper if you can just coerce the thing to preview into a constant via .constant()?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: