passing arguments to collection?
Is there a pattern for passing a customizable query param that can be passed on to the queryFn?
I'm thinking of just having a useMemo'd -> context collection for this, but wondering if there's a different approach already
3 Replies
exotic-emeraldOP•3w ago
what I mean is:
obviously that id may change in the future
rare-sapphire•3w ago
Factory function with cache
https://github.com/TanStack/db/issues/652#issuecomment-3480465376
GitHub
Ability to create collections with parameterized query functions ·...
After reading Tanstack DB documentation, I was not able to find an example that fetches data from server with parameters. All examples show how to fetch all the data. I need to use project ID to fe...
exotic-emeraldOP•3w ago
ah I see, thanks Kyle, it's more or less what I had in mind.