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

RiverPod globals drawback #3637

Open
xOldeVx opened this issue Jul 1, 2024 · 2 comments
Open

RiverPod globals drawback #3637

xOldeVx opened this issue Jul 1, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation needs triage

Comments

@xOldeVx
Copy link

xOldeVx commented Jul 1, 2024

I'm using Provider for a while, i used bloc also, now in my new project i'm trying the RiverPod, but quickly i think to come back to other packages, why?

because it's really nice to little project or examples like counter project, but when the project is scale up, it's really hard to manage all this globals variables.

The global variables is out of the scope and live anywhere, it's the benefit and it's too they big drawback because if i want to add a little helper variable, it's can't be a part of the provider, unlike Provider package that using class, and you mange all of your repository in the same class, and can add variables to your class and manage all of them in the same scope, RiverPod is really less flexibility!

Before i give up this package, I would like to know if there is an example of using RiverPod in a medium / big project. OR if there's an example how using it in a class.

By the way, I'm using NotifierProvider but it's not enough for a class, because the class is limit only to one type (Notifier<T>), I'm looking for a Provider that listen to all of the class properties (with a selector of course).

Thanks!

@xOldeVx xOldeVx added documentation Improvements or additions to documentation needs triage labels Jul 1, 2024
@Trung15010802
Copy link

Trung15010802 commented Jul 12, 2024

Why don't use use a custom class/model/state you created in your own in NotifierProvider ?

@sagnik-sanyal
Copy link

sagnik-sanyal commented Nov 1, 2024

Provider package that using class, and you mange all of your repository in the same class, and can add variables to your class and manage all of them in the same s

well that's the reason folks use freezed sealed unions or equatable to customise the state classes and that should solve the issue of customisation that you are talking about

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation needs triage
Projects
None yet
Development

No branches or pull requests

4 participants