Hacker News new | past | comments | ask | show | jobs | submit login

SwiftUI has state. The idea is that all layout code is defined as a pure function of the state. Basically you can annotate properties with `@State` and each time one of those properties is updated, your view `body` function is re-run to produce an updated view.

SwiftUI tries to do clever stuff under the hood to only update the portions of the view hierarchy affected by the state change for performance.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: