rrousselGit / riverpod

A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
https://riverpod.dev
MIT License
5.82k stars 888 forks source link

We need a pattern to flow #3499

Open 2shrestha22 opened 3 weeks ago

2shrestha22 commented 3 weeks ago

Describe what scenario you think is uncovered by the existing examples/articles Riverpod is too flexible and awesome but developers often get lost in it. Developers needs a pattern or structure to flow so that the project remains organized. If coming from BloC, MVC or MVVM pattern developers often gets confused on what would be a better way to organize the code. Without official documentation and recommended pattern it always feels something is missing.

Describe why existing examples/articles do not cover this case Official examples does not show a specific pattern to flow.

Additional context Add any other context or screenshots about the documentation request here.

snapsl commented 3 weeks ago

Take a look at the third-party examples riverpod.dev. These show programming patterns that you can follow using riverpod.

2shrestha22 commented 2 weeks ago

Third party examples doesn't solve the problem. People tends to create their own solution. Let's take bloc as an example. There is clear instructions on how you name your bloc, state and events and where you put bloc and state. Bloc always feels structured than riverpod. Our team is not moving forward with riverpod because of this. I feel I don't know how to describe it.

snapsl commented 2 weeks ago

I agree that the bloc documentation is more comprehensive and mature than the current state of the riverpod documentation. Also, bloc comes with its own architecture pattern (BLoC). Riverpod, on the other hand, is a state managment framework (docs say a "reactive caching framework"). It does not force you to use a specific architecture pattern such as BloC, MVC or MVVM, but you can choose one. That is why it is not part of the documentation and probably never will be.