nanostores / query

⚡️ Powerful data fetching library for Nano Stores. TS/JS. Framework agnostic.
MIT License
228 stars 10 forks source link

revalidateOnFocus #54

Closed sitarass closed 3 months ago

sitarass commented 3 months ago

@dkzlv revalidateOnFocus option doesn't work :(

dkzlv commented 3 months ago

@sitarass Can you provide more information? This demo works perfectly for me.

https://github.com/user-attachments/assets/bfce6cca-2713-4121-b669-2f23d9b5f257

I'll close for now as I'm almost sure this is some misunderstanding and not a real bug. Feel free to add more information here!

sitarass commented 3 months ago

@dkzlv I made an isolated reproduction, check it here.

dkzlv commented 3 months ago

@sitarass It works as well. Precisely as it should.

Please, stick to steps/expected/actual form.

sitarass commented 3 months ago

@dkzlv when you switch between e.g. tabs and made a refocus on the above one, api call not called again, I didn't see a refetch on network

sitarass commented 3 months ago

@dkzlv Did I get something wrong?

dkzlv commented 3 months ago

@sitarass Yep.

https://github.com/user-attachments/assets/634bd6aa-38e2-475b-9595-f79d1356cb5b

sitarass commented 3 months ago

@dkzlv Ok thanks, you're right, it works exactly as it should. But I am noticing that when I have the dev tools tab open it does not work :( . I tested with ui with the dev tools tab closed.