riverpod icon indicating copy to clipboard operation
riverpod copied to clipboard

Documentation rework

Open rrousselGit opened this issue 2 years ago • 13 comments

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 a Map<Key, Provider> #1018
  • 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

rrousselGit avatar Dec 31 '21 12:12 rrousselGit

Can we include #513, too? It can be added after listing all the providers, for further customization.

YoussefRaafatNasry avatar Jan 01 '22 04:01 YoussefRaafatNasry

#513 is special, because to begin with, making custom providers is not officially supported.

rrousselGit avatar Jan 01 '22 08:01 rrousselGit

@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.

chunghha avatar Jan 16 '22 19:01 chunghha

Feel free to make a PR adding it to the list if you want

rrousselGit avatar Jan 16 '22 20:01 rrousselGit

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!

chunghha avatar Jan 17 '22 01:01 chunghha

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.

GitGud31 avatar Jan 17 '22 12:01 GitGud31

I don't personally add third party repositories to the list.

If you want one to be added, please make a pull request

rrousselGit avatar Jan 17 '22 14:01 rrousselGit

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?

PavelPZ avatar Jan 23 '22 10:01 PavelPZ

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

rrousselGit avatar Jan 29 '22 12:01 rrousselGit

Ok, I will prepare a modified version and let you know.

PavelPZ avatar Jan 30 '22 09:01 PavelPZ

I prepared new example version, it is available here.

Feel free to comments it.

PavelPZ avatar Feb 03 '22 12:02 PavelPZ

Running example is available here.

PavelPZ avatar Feb 03 '22 12:02 PavelPZ

The issues #326 and #239 are related, about documentation improvement suggestions.

ntc2 avatar Feb 19 '22 02:02 ntc2

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

rrousselGit avatar Oct 13 '22 16:10 rrousselGit