whats the best or recommended architecture for jet...
# compose
r
whats the best or recommended architecture for jetpact compose
1
s
The guide to app architecture remains our opinionated guidance for a common architecture for Android apps. You'll also find that any arch that follows unidirectional data flow works well with compose.
Practically, in a hybrid app this usually means one Fragment per screen that holds a ViewModel. In a pure-compose app, the ViewModel will be hold by a screen-level composable.
r
Great, Thank you !
s
Note – you'll hit some rough edges right now in a pure compose app (navigation isn't shipped; there's no way to scope ViewModels yet).
r
Dagger hilt work with a pure Compose app?
c
Should be able to inject things into a fragment with hilt and so that should take care of any DI that you need for now?
d
The platform should be a detail, even more if we're talking about a specific tool. If it's the core of the architecture, that's a no-architecture