Zach Klippenstein (he/him) [MOD]
06/01/2021, 1:06 PMColton Idle
06/01/2021, 1:34 PMZach Klippenstein (he/him) [MOD]
06/01/2021, 3:25 PMeygraber
06/01/2021, 10:00 PMFlow.collectAsState
at the top of my tree, and rely on Compose skipping nodes if the state didn't change.
Haven't done enough real work with it to see if there are performance problems at scale, but so far so good.Colton Idle
06/01/2021, 11:24 PMZach Klippenstein (he/him) [MOD]
06/01/2021, 11:39 PMeygraber
06/03/2021, 6:00 AMZach Klippenstein (he/him) [MOD]
06/03/2021, 2:59 PMeygraber
06/03/2021, 4:44 PMcollectAsState
at the root, and passing the different values down the tree.
Streams are actually more of a implementation detail in my architecture (https://github.com/eygraber/cure; still in the planning phase and not production ready yet). The basic idea is:
Many UseCases (business logic, etc...) -> Compositor (combines all of the use cases data into a State object and emits to a flow) -> Renderer (collectAsState from the Compositor and translate the State into UI)
There's some building blocks around that which make it easier to work with, but that's the main idea.