is it bad practice to access a repository from ins...
# compose
n
is it bad practice to access a repository from inside of a composable without a ViewModel? i am only performing reads from an API.
w
It depends IMHO. However, I would recommend passing a callback
callback: suspend () -> Any?
to that composable instead of the repository instance, and in that callback call your read function. Also, use the local scope of that composable to make that call concurrency structured.