-
-
Notifications
You must be signed in to change notification settings - Fork 974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix invalid example (create is required) #3882
Conversation
WalkthroughThe pull request focuses on updating the Riverpod migration documentation, specifically the quickstart guide for transitioning from the Provider package. The changes provide a more structured, incremental approach to migration, with enhanced explanations about moving from Changes
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
website/docs/from_provider/quickstart.mdx (2)
36-38
: Make thecreate
parameter name explicit for better clarityWhile the code is functionally correct, making the parameter name explicit would improve readability and align better with the documentation style:
-final myNotifierProvider = ChangeNotifierProvider<MyNotifier>(create: (ref) { +final myNotifierProvider = ChangeNotifierProvider<MyNotifier>( + create: (ref) { return MyNotifier(); });
Line range hint
223-227
: Consider adding a comment explaining the ignore directiveWhile the code is correct, it would be helpful to add a comment explaining why the
unsupported_provider_value
ignore directive is necessary here, as it's part of the temporary migration pattern.// ignore_for_file: unsupported_provider_value +// This ignore directive is needed during migration as we're temporarily using +// ChangeNotifier with code generation until full migration to Notifier @riverpod MyNotifier example(Ref ref) { return ref.listenAndDisposeChangeNotifier(MyNotifier()); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
website/docs/from_provider/quickstart.mdx
(1 hunks)
🔇 Additional comments (2)
website/docs/from_provider/quickstart.mdx (2)
Line range hint 214-221
: LGTM! Well-implemented utility extension
The extension method correctly handles both listener management and disposal, following best practices for ChangeNotifier lifecycle management.
Line range hint 234-239
: LGTM! Clear example of the migration target
The example effectively demonstrates the final form of a fully migrated provider using code generation, which serves as a good reference for the end goal of the migration process.
invalid fix |
Summary by CodeRabbit
ChangeNotifierProvider
andProxyProvider
migration.