Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

solid-disabled-query-ssr.md

14 lines792 Bytes

1---
2'@tanstack/solid-query': patch
3---
4​
5fix: finish server renders that read a disabled query. Reading `.data` from a
6`useQuery` with `enabled: false` and nothing cached stopped an SSR render from
7ever completing β€” no bytes at all, since the data node was handed a promise
8that can never settle. That parking is intended client behaviour (the reader
9suspends into the nearest `<Loading>` until an enable, refetch or cache write
10revives the compute), but on the server there is no later: the render has to
11finish, and nothing will enable the query or write the cache before it does.
12A disabled query with no data now commits its idle state on the server, which
13is the contract the scalar metadata channel already honoured and the state the
14client hydrates to. Client behaviour is unchanged.