`exhaustive-deps` not complaining about `window.location.origin` anymore
Hey,
in our codebase we are using window.location.origin inside our queryFn. Previously the exhaustive-deps check was complaining if we did not include it in the key. But if we did I think some kind of error occurred (can not really recall right now). So we ended up with something like
Now we implemented a new query where we have the same kind of setup using the window location again. The new queryKey did not complain about the window missing. So we checked at the other places and also the older queries don't complain anymore.
Has the rule changed?
And in general: What would be the best practise for using window properties inside queryFn - include it in the key? Don't?
Thanks in advance
in our codebase we are using window.location.origin inside our queryFn. Previously the exhaustive-deps check was complaining if we did not include it in the key. But if we did I think some kind of error occurred (can not really recall right now). So we ended up with something like
Now we implemented a new query where we have the same kind of setup using the window location again. The new queryKey did not complain about the window missing. So we checked at the other places and also the older queries don't complain anymore.
Has the rule changed?
And in general: What would be the best practise for using window properties inside queryFn - include it in the key? Don't?
Thanks in advance