Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about exhaustive state check #94

Open
1EDExg0ffyXfTEqdIUAYNZGnCeajIxMWd2vaQeP opened this issue Dec 19, 2022 · 0 comments
Open

Comments

@1EDExg0ffyXfTEqdIUAYNZGnCeajIxMWd2vaQeP

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant