Modelling reusable CRUD with Riverpod #535
Unanswered
Moussenger
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's say we have the next requisites:
How would you model that with Riverpod? The approach I found:
State Notifier provider approach:
Problems I found in this approach: How to read this provider in another one that wants to await until AsyncValue is AsyncData to continue processing? I.e.
Am I in the right direction? Is there another better approach to model this?
EDIT:
Playing a little more with this, I realize that probably the problem I found regarding using it in a FutureProvider could be solved like this:
I think that is the right approach in this case. Still interested to know if the original question about how to face the whole problem is valid and good practice.
Beta Was this translation helpful? Give feedback.
All reactions