Skip to content

Question: pinia store containing task? #71

Open
@shaunc

Description

@shaunc

Newbie question -- reading through your documentation -- in particular regarding use with store.

If I have a multiple components that depend on the same data loaded asynchronously, won't it be better to put the task itself in the store? Doing it the way you suggest will mean that one component will have access to task state, but for others the data just appears magically, or is missing. If they also request via useApiTask, there could be multiple overlapping requests for the same data.

(But perhaps I'm missing something.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions