Describe the bug
When options are passed as a function to createQueryController, the page seems to freeze and eventually crash.
pokeData = createQueryController(
this,
() => ({
queryKey: ['pokemon', this.pokemon],
queryFn: ({ signal }) =>
fetch(`https://pokeapi.co/api/v2/pokemon/${this.pokemon}`, {
signal
}).then((r) => r.json())
}),
queryClient
);
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/bitter-cherry-4cnvrx
Steps to reproduce
- Open playground
- Notice iframe page crashes
- change src/poke-display so non-function options are used
- Notice no crash
Expected behavior
Functions should be used to create options without crashing.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS: MacOS
- Browser: Chrome
- Browser version: 148.0.7778.168
Tanstack Query adapter
None
TanStack Query version
v0.2.1
TypeScript version
v6.0.3
Additional context
No response
Describe the bug
When options are passed as a function to createQueryController, the page seems to freeze and eventually crash.
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/bitter-cherry-4cnvrx
Steps to reproduce
Expected behavior
Functions should be used to create options without crashing.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Tanstack Query adapter
None
TanStack Query version
v0.2.1
TypeScript version
v6.0.3
Additional context
No response