Skip to content
Discussion options

You must be logged in to vote

Technically, the fact that providers can use other providers doesn't form a dag on its own. The graph could be cyclic.
Riverpod goes out of its way to make it an error if you make a cycle though, to ensure we do have a unidirected graph.

This enables Riverpod to guaranteee that providers will update in the optimal order. There's a bunch of tests for it
Your scenario is covered here

Given:

     A
   /   \
  B     C
    \  /
     D

The only legal orders are:

[a, b, c, d],
[a, c, b, d],

We can't have a chain of rebuild like a > b > d + c > d, and d provider will …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kartal-ocell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants