I’ve been looking at <Molecule> for use with Compo...
# compose
s
I’ve been looking at Molecule for use with Compose. It’s intriguing the idea that’s being proposed. Effectively, it seems like it boils down to Presenter as a function. What are the benefits that this enables me to take advantage of that I didn’t have access to before? I’m curious as to peoples thoughts, and am looking for opinionated answers.
z
I think this is very similar in spirit to the Square Workflow library, but much more elegant and flexible, with less boilerplate. So all the advantages of that, and more.
👀 1
c
I'm curious of what the goal is, compared to normal Flow functions. Previously, we had: • functions that return Flows, which generate the data • composables that display UI from those Flows With Molecule, my understanding is that we get: • composables that return Flows, which generate the data • composables that display UI from those Flows I don't really get the appeal of what it helps with, since it has a bit more boilerplate than normal Flows
a
I don't think Molecule is intended to be used with Compose UI. If you are using Compose UI, you can already use composable functions and snapshot states without the need of Molecule.
c
The Molecule repo's README uses Molecule and Compose UI for the examples.
a
But no example of using Molecule with Compose UI. I can't think of any advantages of that. You can always separate UI logic and business logic in Compose UI without using Molecule.