Reducing React Query polling and streaming re-renders in a Tauri WebView
My Tauri desktop app used CPU every few seconds while idle. React Query’s focusManager only listens to visibilitychange, so polling kept running in a window hidden behind others. This post covers stopping it with Tauri’s focus events, a spread of the whole query result that doubled re-renders, and freezing a streaming Markdown answer block by block once each block is complete.