Skip to content

Diamond store dependencies #2660

@zmitry

Description

@zmitry

component: svelte/store;
issue: diamond dependencies for derived values
repl: https://svelte.dev/repl?version=3.1.0&gist=0f3250ae87011dc9a91e8e4ab8ddd6f9

For diamond dependencies you have issue with unnecessary updates which affects to useless component rerendering or unnecessary computations.
You can solve this issue with approach similar to mobx https://github.com/mobxjs/mobx/blob/a5cb65926621266716f8d11d716bf337e60dc3c1/src/core/observable.ts#L136
Or I think it's doable with topological ordering of stores. The issue with that stores might be created at runtime and even from js files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions