riverpod icon indicating copy to clipboard operation
riverpod copied to clipboard

We need a pattern to flow

Open 2shrestha22 opened this issue 2 months ago • 3 comments

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.

2shrestha22 avatar Apr 21 '24 06:04 2shrestha22

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

snapsl avatar Apr 21 '24 19:04 snapsl

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.

2shrestha22 avatar Apr 24 '24 01:04 2shrestha22

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.

snapsl avatar Apr 24 '24 05:04 snapsl