I have watched a couple of molecule videos without fully grasping what it is properly, Erik explained it so easily and I finally understood what it is and how to use it
That is not the impression I got. Most ViewModel's have a primary function of merging data Flows together into some UiState that the UI can consume. Molecule simply allows you to use the Compose runtime as a way to manage merging these Flows into a FlowState. The benefits should be seen immediately. If not, either you have implemented it incorrectly or it is simply not the pattern that fits your needs.
Molecule simply allows Kotlin developers to use the existing Compose Runtime to produce StateFlow. It *is* a 3rd party dependency, but it exists to allow you to use what you already know. If you're comfortable with Compose on the UI side, all the sudden you can use it in the rest of your application as well. I have no connections to Google whatsoever but I wouldn't be surprised if there is direct support for this usage from the Compose developers themselves in the not-too-distant future.
I have watched a couple of molecule videos without fully grasping what it is properly, Erik explained it so easily and I finally understood what it is and how to use it
These videos are great sources for inspiration. Thanks for sharing!
Thanks for sharing the practical use cases!
I wish we could have heard the questions
This is one of those things where it is overkill for most projects but when you need it you are glad it exists. Great presentation!
I didn't watch the whole video but are referring to the compose when you said it is overkill for most projects please?
@@_hudeifa23 I guess they mean Molecule
That is not the impression I got.
Most ViewModel's have a primary function of merging data Flows together into some UiState that the UI can consume. Molecule simply allows you to use the Compose runtime as a way to manage merging these Flows into a FlowState. The benefits should be seen immediately. If not, either you have implemented it incorrectly or it is simply not the pattern that fits your needs.
I can replace combine with merge + scan flow operators instead of an extra 3rd party dependency.
Molecule simply allows Kotlin developers to use the existing Compose Runtime to produce StateFlow. It *is* a 3rd party dependency, but it exists to allow you to use what you already know. If you're comfortable with Compose on the UI side, all the sudden you can use it in the rest of your application as well. I have no connections to Google whatsoever but I wouldn't be surprised if there is direct support for this usage from the Compose developers themselves in the not-too-distant future.