riverpod
riverpod copied to clipboard
Documentation rework
The issue for tracking the documentation revamp Feel free to suggest issues that are important.
This list of issues is not an exhaustive list (for now)
- List all providers with their use-cases
- [x] Provider
- [x] StateNotifierProvider
- [x] FutureProvider
- [x] StreamProvider
- [x] StateProvider
- [x] ChangeNotifierProvider
- [ ] Explain the philosophy of Riverpod (compile safety/reactive/declarative/composable/testable/unidirectional dataflow)
- [ ] The ideal Riverpod application (aka chaining FutureProvider to make a fully ""stateless"" app – for the lack of a better word)
- [ ] Why use immutable state
- [ ] Why providers being global isn't a problem
- [ ] "I don't have a ref, how can I read my providers?", or how this is a false problem and you do in fact have a ref
- [ ] Riverpod for Provider users
- [ ] StateNotifier for ChangeNotifier users
- [ ] StateNotifierProvider + Freezed
- [ ] obtaining localization inside providers
- [ ] add Streamprovider usage example
- [ ] StateNotifierProvider with async state
- also update FutureProvider doc to redirect to this snippet
- [ ] Explain how
AsyncValue.when
is similar to a "switch case" - concepts:
- [ ] expand on how
family
is similar to aMap<Key, Provider>
#1018
- [ ] expand on how
- Cookbooks
- [ ] https://github.com/rrousselGit/river_pod/issues/956
- [ ] https://github.com/rrousselGit/river_pod/issues/85
- [ ] https://github.com/rrousselGit/river_pod/issues/57
- [x] #1023
- [ ] Initializing a provider inside the main function
Can we include #513, too? It can be added after listing all the providers, for further customization.
#513 is special, because to begin with, making custom providers is not officially supported.
@rrousselGit I am documenting my template app here, https://github.com/chunghha/fl_template
I know I can't go deeper details of riverpod's providers and features than yours. However, I thought it may cover few topics per your list of cookbooks or can be complementary to take a look. So, wish that you and others would find it useful.
Feel free to make a PR adding it to the list if you want
I assume that there will be Cookbooks section on the menu of riverpod.dev similar to "Third party examples". As I will see that, I will open a PR to link. Thanks for your kind word, encouraged!
Hi Remi!
This is an attempt to showcase the The new Flutter skeleton app with Riverpod so it can be added to the cookbook.
Reviewers upvote/give feedback on this comment if you think the demo follows good practices of Riverpod.
I don't personally add third party repositories to the list.
If you want one to be added, please make a pull request
I prepared example here.
It is about how to use riverpod and freezed to simplify Flutter Navigator 2.0 usage.
Wouldn't it be suitable for your cook book?
Possibly, we'll have to see in due time. I'd have to carefully review your example to make sure it's matching the good practices
Ok, I will prepare a modified version and let you know.
Running example is available here.
The issues #326 and #239 are related, about documentation improvement suggestions.
I'll close this issue in favor of a new more concrete issue https://github.com/rrousselGit/riverpod/issues/1762
If you have any documentation suggestion, please make them there