Closed elhe26 closed 5 years ago
Hey there,
The code definitely resembles each other but the architecture is completely different. In my case the view model uses the stream internally to produce a new state and then notify the view that something has changed.
In the case of BLoC the stream is the sole input and output for the logic component. On my side I can have additional methods of handling the state with multiple output properties and public functions to call.
On the BLoC side you have to go through your sink/event actions pipeline. And I'm not a big fan of "have-to's" . But it does look very similar. If the LoadingController used an enum and you broadcast different values based on some logic like I do it would look even more similar.
Hi @FilledStacks ,
I'm wondering if the approach used in the architecture you proposed resembles the bloc pattern.
For example, this code is using the bloc pattern:
And your implementation:
What do you think?