top | item 27456836

(no title)

akagr | 4 years ago

This! It’s generally a good idea to have a lot of smaller “dumb” views that are stateless and depend on their parameters, and a few “intelligent” views that bring the children together and provide state logic. That puts reasonable boundaries between the view and business logic, even in declarative code like SwiftUI.

I’m not a Swift or SwiftUI expert, but have written declarative UI quite a bit. Don’t imagine some base best practices would differ too much.

discuss

order

No comments yet.