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

Promote isValidating to the global level of data and error #569

Merged
merged 2 commits into from
Sep 16, 2020

Conversation

blackarctic
Copy link
Contributor

@blackarctic blackarctic commented Jul 29, 2020

This fixes #549 by caching and broadcasting isValidating in the same way that data and error are cached and broadcasted.

Before

before

After

after

@blackarctic
Copy link
Contributor Author

Anything I can do to speed up a review?

@blackarctic
Copy link
Contributor Author

Bump

Copy link
Member

@shuding shuding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me! It would be great to have a test for this I think.

Thank you @blackarctic!

@blackarctic
Copy link
Contributor Author

@shuding Test has been added: useSWR › should broadcast isValidating

Test on master

before

Test on fix-is-validating

after

src/use-swr.ts Outdated Show resolved Hide resolved
@blackarctic
Copy link
Contributor Author

Bump

2 similar comments
@blackarctic
Copy link
Contributor Author

Bump

@kristojorg
Copy link

Bump

@shuding
Copy link
Member

shuding commented Sep 16, 2020

Thank you all for helping!

@shuding shuding merged commit 05755f8 into vercel:master Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants