rrousselGit / riverpod

A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
https://riverpod.dev
MIT License
5.82k stars 888 forks source link

Add AsyncValue documentation #3500

Open snapsl opened 2 weeks ago

snapsl commented 2 weeks ago

Make riverpod onboarding easier.

AsyncValue is a core feature of riverpod when we use AsyncNotifier / FutureProvider, but is not explained in the documentation. Currently new user have to look into the api reference or source code to get basic information.

The documentation should contain:

In case information is missing, feel free to add them.

If needed, I can contribute to the docs.

rrousselGit commented 2 weeks ago

Sounds like this overlaps with the API reference.

It's normal IMO that folks have to look at the API reference if they want docs about a very specific thing.

snapsl commented 2 weeks ago

Yes, it will overlap. But, since AsyncValue is exclusiv to riverpod and needed for FutureProvider / AsyncNotifier, a new user has no information about this concept. The documentation could give a small introduction to AsyncValue and how to use it. A detailed description of the individual methods that AsyncValue provides is of course part of the API reference.

rrousselGit commented 17 hours ago

I don't like the idea of having an overlap with the API reference.

If we want to improve AsyncValue's docs, I'd rather update the API reference to have better docs. Then link the AsyncValue's dartdoc page better in the doc.

Duplicate content will get out of sync.

snapsl commented 15 hours ago

If we want to improve AsyncValue's docs, I'd rather update the API reference to have better docs. Then link the AsyncValue's dartdoc page better in the doc.

Maybe it is possible to link the api reference with the documentation similar to how Signals does it.

rrousselGit commented 10 hours ago

I'm planning on having a way to extract dartdoc and put it into the website.