Reproduction steps
- Display component subscribed to
atomWithSuspenseQuery
- Hide component
- Reset query
queryClient.resetQueries
- Display that component again
Expected state
Components suspends while refetching data
Actual behavior
useAtomValue returns query in "pending" state
Minimal reproducible example
https://codesandbox.io/p/sandbox/jotai-react-query-repro-kchwjt
Packages versions:
"react": "18.2.0",
"jotai": "2.8.1",
"jotai-tanstack-query": "0.8.5",
"@tanstack/query-core": "5.36.1",
"wonka": "6.3.4",
"@tanstack/react-query": "5.37.1"