Simple TanStack Query with Preact

UPDATE About 3 days after writing this, Tanstack realeased a native preact tanstack query adapter ! Just use that and ignore the rest. Thanks to everyone invovled in that. ( @tanstack/preact-query ) Here is a simple approach to getting @tanstack/react-query working in a preact project. I’m certain I’m not the only person to arrive at this, but I also didn’t manage to find anyone suggesting this…