Skip to content

Question about exhaustive state check #94

@1EDExg0ffyXfTEqdIUAYNZGnCeajIxMWd2vaQeP

Description

In your examples, you use this pattern a lot:

const asyncHero = useAsync(..., ...);
  return (
    <div>
      {asyncHero.loading && ...}
      {asyncHero.error && ...}
      {asyncHero.result && ...}
    </div>
  );

Is this supposed to cover all possibilities? I don't want it to silently fail with an empty div. If so, would it be possible to change the typing to represent this fact?

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