RedBrogdon / rebloc

A state management library for Flutter that combines aspects of Redux and BLoC.
BSD 3-Clause "New" or "Revised" License
215 stars 21 forks source link

Differences from bloc library #10

Closed chimon2000 closed 5 years ago

chimon2000 commented 5 years ago

On the service, @felangel's bloc library seems to have a very similar api and intent. Wondering what some of the differences are?

RedBrogdon commented 5 years ago

Good question.

Both this package and that one (assuming you grab flutter_bloc with it) provide a set of classes to manage state within an application. as well as a collection of widgets designed to propagate state information down the widget tree and input events back up in response. They also both use Dart streams to pass data around.

The main difference, really, is that Rebloc uses a Redux-like pattern for managing the flow of information, and bloc uses the BLoC pattern. There are not, as I understand it, actions, middleware, or reducers in bloc as they exist in rebloc. Bloc also uses the term state in a different way, and is designed to house app state in multiple places rather than a single, monolithic object as Rebloc does.

None of these differences make either library better or worse, at least in my mind. They're just two different patterns with different plusses and minuses.

felangel commented 5 years ago

Yes, I completely agree with @RedBrogdon 👍