KMP-ObservableViewModel icon indicating copy to clipboard operation
KMP-ObservableViewModel copied to clipboard

Question: When Can we Expect the support for Jetbrains Compose?

Open avidraghav opened this issue 1 year ago • 4 comments

Hi Rick, first of all great work. I'm using Compose for iOS in my KMM project hence I can't use this library currently. So do you have any date/month in your mind by which there will be support for Jetbrains Compose? Thanks

avidraghav avatar Apr 21 '23 05:04 avidraghav

Hi! I am afraid there is no ETA on Compose support. However it would be very helpful to know how you are using Compose for iOS and what you would expect from KMM-ViewModel.

Note: while there isn't any support for Compose (yet), it's already possible to use ViewModels with StateFlows in Compose.

rickclephas avatar Apr 21 '23 10:04 rickclephas

I was going to use this library until I realised there is not Extension function or any way so that the KMM ViewModel from your library can be initialised in a Composable. I guess that will be general requirement. You already got the ViewModel part covered just need to provide some way so that the KMM ViewModel can be initialised in a Composable.

And Yeah I'm using Decompose + KRouter to meet my project requirements

avidraghav avatar Apr 21 '23 11:04 avidraghav

Hey @avidraghav You can use decompose instanceKeeper to initialize the viewModel!

oianmol avatar May 21 '23 05:05 oianmol

Hi @oianmol, yup I asked this question when I didn't knew about Decompose InstanceKeeper. I'm already using the same in my project Jetstar here Thanks

avidraghav avatar May 21 '23 06:05 avidraghav