whats the best or recommended architecture for jetpact compose
➕ 1
s
Sean McQuillan [G]
09/25/2020, 9:23 PM
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
rkeazor
09/25/2020, 9:24 PM
Great, Thank you !
s
Sean McQuillan [G]
09/25/2020, 9:25 PM
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
rkeazor
09/25/2020, 10:32 PM
Dagger hilt work with a pure Compose app?
c
Colton Idle
09/26/2020, 1:58 AM
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
Davide Giuseppe Farella
09/26/2020, 7:08 PM
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