Skip to content

Improve documentation on Stores internals #8298

@fredguth

Description

@fredguth

Describe the problem

I'm frustrated that it is not clear for a newbie what a start callback is. It is clear that a Readable that doesn't change is not useful, but there is no metaphor in the documentation explaining start. There are good examples, though.

Besides, the source code doesn't help either. For example:

/** Cleanup logic callback. */

/** Cleanup logic callback. */
type Invalidator<T> = (value?: T) => void;

What information does this description give?

After a long time trying to understand what an Invalidator is, I think it is about making stores compatible with rxjs, but this is not clear from the documentation nor the source code.

Describe the proposed solution

I would like to see a better metaphor about the start callback in the documentation. And references in the source-code to what Invalidator, StartStopNotifier are. The current definitions in the source code are "tautologic", for example:
A StartStopNotifier Start and stop notification callbacks..

Alternatives considered

A blog post.

Importance

nice to have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions