You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does not work, because (as far as I understand it) notifyListeners is a NOP in build(). That's fine, because I'm quite heavily abusing the fact that Riverpod even allows mutability and I'm technically performing side effects in build. It's just very weird that notifyListeners seems to work but does nothing, which made debugging this very confusing. (I made the wrong assumption that my mistake had to be in the provider watching the broken one.)
Describe the solution you'd like
Of course I'd like Riverpod to allow even more abuse, but I believe it would be fine if there were a warning that there is no valid use of notifyListeners in build() (if I'm not missing any). I don't believe a documentation change would be sufficient because this is so weird to debug.
Thanks for Riverpod!
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I often (ab)use Riverpod as enhanced global variables like this:
This works fine so far. Now the naive way to return a list of all the foos could look like this:
This does not work, because (as far as I understand it) notifyListeners is a NOP in build(). That's fine, because I'm quite heavily abusing the fact that Riverpod even allows mutability and I'm technically performing side effects in build. It's just very weird that notifyListeners seems to work but does nothing, which made debugging this very confusing. (I made the wrong assumption that my mistake had to be in the provider watching the broken one.)
Describe the solution you'd like
Of course I'd like Riverpod to allow even more abuse, but I believe it would be fine if there were a warning that there is no valid use of notifyListeners in build() (if I'm not missing any). I don't believe a documentation change would be sufficient because this is so weird to debug.
Thanks for Riverpod!
The text was updated successfully, but these errors were encountered: