Adrian Tappe
11/05/2021, 10:20 AMfun format(number: Int): String
it uses then is side-effect free.
Where would you use it with Compose? In the ViewModel and expose the State as String or in Compose?
I intuitively would expose the number as state - and see the formatting as part of transforming the state to UI - so put it into the Compose part.
How would you then get this class in Compose - if for performance reasons I’d usually inject it as @Singleton
or @Reusable
via dagger?Brian G
11/05/2021, 12:57 PMproduceState
to load it into Compose