Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make bloc_effects part of this repo #4008

Open
guenth39 opened this issue Nov 23, 2023 · 5 comments
Open

feat: Make bloc_effects part of this repo #4008

guenth39 opened this issue Nov 23, 2023 · 5 comments
Labels
enhancement candidate Candidate for enhancement but additional research is needed

Comments

@guenth39
Copy link

Description

The bloc_effects package from @DartAndrik should be part of the official bloc ecosystem like bloc_concurrency and hydrated_bloc. The package solves the problems described here as effects in a common and handy way. It has the big advantage that you have to use less BlocListners and things that have to be handled once (called effects here) do not dilute the state. I have often had the problem of overly complex states due to effects that had to be mapped in the state. The package helps a lot to structure code more clearly and to separate code parts from each other. It should therefore be shared with all developers and used accordingly in the tutorials. Adding the package to the bloc repo would help to do so.

Desired Solution

Contact the author of the package and, if possible, transfer the package to the packages folder of this repository so that maintanace and visibility are guaranteed.

Alternatives Considered

Develop an own official package to solve the problem.

@DartAndrik
Copy link

Hi, here is the similar feature request where Felix explained his point regarding the effects in bloc. Actually this explanation was the main reason for creating bloc_effects
My opinion is: bloc is beautiful itself and introducing single life events could disrupt the continuous event flow fundamental to bloc's approach, complicate its structure, making it harder to understand and manage, and may create unique challenges in testing, deviating from standard event behaviors.
But I don’t mind my code being added if it pleases Felix and the community)

@Hackmodford
Copy link

I just used this to easily show error messages in my UI.

My current architecture has a bloc per page and it is considered part of the presentation layer, not the application layer.

@feinstein
Copy link

@DartAndrik sorry I don't understand your point. You appear to defend that bloc_effects is not valid when you say:

My opinion is: bloc is beautiful itself and introducing single life events could disrupt the continuous event flow fundamental to bloc's approach, complicate its structure, making it harder to understand and manage, and may create unique challenges in testing, deviating from standard event behaviors.

So I wonder why you created the library in the first place, if you don't believe in its value?

@DartAndrik
Copy link

DartAndrik commented May 10, 2024

sorry I don't understand your point

Hi) Let's clarify a little(sorry for the repetition and confusing).

  • I think bloc_effects is convenient to use - an alternative way to listen to Bloc for the purpose of processing single live events.
  • it was created as a separate library as part of my projects hook based state management
  • I'm going to support and develop it. and it is open to all community requests and issues)
  • I don’t mind adding it to the Block as is or reworking it if it suits Felix

I just do not like when developers mix 2 approaches to achieve the same goal because it looks strange an makes mess.

@jttuboi
Copy link

jttuboi commented May 21, 2024

alternative to bloc_effects: bloc_presentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement candidate Candidate for enhancement but additional research is needed
Projects
None yet
Development

No branches or pull requests

6 participants