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
Using ChangeNotifierProvider is discouraged by Riverpod and exists primarily for:
an easy transition from package:provider when using its ChangeNotifierProvider
supporting mutable state, even though immutable state is preferred
info
Prefer using NotifierProvider instead.
Consider using ChangeNotifierProvider only if you are absolutely certain that you want mutable state.
The documentation for ChangeNotifierProvider states that its usage is discouraged in favor of NotifierProvider. While this is understandable, I’d like some clarification on the following points:
When transitioning to Riverpod, how significant is it to eventually replace ChangeNotifierProvider with NotifierProvider? Are there any specific problems or limitations with continuing to use ChangeNotifierProvider long-term?
What capabilities or advantages does NotifierProvider offer that ChangeNotifierProvider lacks?
The documentation mentions that mutable state is discouraged in Riverpod. Why is mutable state seen as an issue in Riverpod, when it was not a problem with package:provider?
I think these details could help provide a clearer understanding for developers transitioning from package:provider to Riverpod. Expanding the documentation to address these points would be very helpful.
Thank you for your time and the work you’ve put into Riverpod!
The text was updated successfully, but these errors were encountered:
from ChangeNotifierProvider https://riverpod.dev/docs/providers/change_notifier_provider
The documentation for ChangeNotifierProvider states that its usage is discouraged in favor of NotifierProvider. While this is understandable, I’d like some clarification on the following points:
I think these details could help provide a clearer understanding for developers transitioning from package:provider to Riverpod. Expanding the documentation to address these points would be very helpful.
Thank you for your time and the work you’ve put into Riverpod!
The text was updated successfully, but these errors were encountered: