Hi Sergey,

In terms of scaling, there will be no real problems with having an AppState object, because the structure can be very modular, with one property per screen (using the lazy instantiation of the object).

To each screen UI component (on both JetpackCompose and SwiftUI) you just pass the screen-specific object.

Unfortunately I didn't have a chance to publish a sample GitHub repository yet, but I hope to do it soon. In the meantime, the code snippet you find on the last page of this article, should give enough guidance for the basic setup.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store