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

(refocus) - refocusExchange not refetching on window focus, only on tab change #2268

Closed
longfellowone opened this issue Feb 10, 2022 · 1 comment

Comments

@longfellowone
Copy link

longfellowone commented Feb 10, 2022

refocusExchange is not refetching on window focus, only on tab change

urql version & exchanges:
"@urql/exchange-refocus": "^0.2.5"
"urql": "^2.1.3"

Windows 10 / Latest edge browser

Steps to reproduce

https://codesandbox.io/s/peaceful-pare-o1nxf?file=/src/index.js
https://o1nxf.csb.app/

Expected behavior

Query should refetch on window focus in addition to tab change (similar to react-query)

Actual behavior

Query only refetches on tab change

@longfellowone longfellowone added the bug 🐛 Oh no! A bug or unintented behaviour. label Feb 10, 2022
@kitten kitten changed the title refocusExchange not refetching on window focus, only on tab change (refocus) - refocusExchange not refetching on window focus, only on tab change Feb 16, 2022
@JoviDeCroock
Copy link
Collaborator

JoviDeCroock commented Feb 25, 2022

We are currently using this event which is a lot less aggressive compared to just focussing as focussing fires a lot 😅 the exchange is fairly small so maybe vendoring it is the best option here.

Main reason to move away from the focus event can be found here #1063

@JoviDeCroock JoviDeCroock removed the bug 🐛 Oh no! A bug or unintented behaviour. label May 26, 2022
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

2 participants