Skip to content

Interop with @nanostores/async #78

@Lezvix

Description

@Lezvix

@nanostores/query exposes async state as:

{ data, error, loading }

while @nanostores/async uses a state-machine shape.

This makes it difficult to use query stores with computedAsync directly.

Example:

const $post = createFetcherStore<Post>(['/api/post/', id]);

const $derived = computedAsync($post, post => {
  return doSomething(post);
});

Question

Is there any plan to align these APIs or provide an official adapter?

Related discussion:
nanostores/async#2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions