HarmonyOS @State Blind to Singleton Tweaks
Toggling a property in a @State singleton? Your HarmonyOS UI stays stubbornly static. Here's the cynical truth and fixes from 20 years of watching frameworks flop.
⚡ Key Takeaways
- @State skips inner class changes—@Observed or AppStorage required.
- AppStorage/@StorageLink enables cross-page singleton sync effortlessly.
- Singletons risk global state pitfalls; HarmonyOS exposes old dev sins.
🧠 What's your take on this?
Cast your vote and see what DevTools Feed readers think
Worth sharing?
Get the best Developer Tools stories of the week in your inbox — no noise, no spam.
Originally reported by dev.to