refactor: trim widget reload plumbing
This commit is contained in:
7 files changed
+2
-66
No files matched your search
@@ -152,9 +152,6 @@ const ScopedTRPCReactProvider = ({
|
||||
return client;
|
||||
});
|
||||
|
||||
// Declared before the cache teardown below so its cleanup runs first: the
|
||||
// persister has to save the real cache and shut down before `clear()` empties
|
||||
// it, otherwise the resulting "empty cache" event would be persisted instead.
|
||||
useEffect(() => {
|
||||
const flush = () => queryPersister.flush();
|
||||
window.addEventListener("pagehide", flush);
|
||||
|
||||
Reference in new issue
Block a user