Closed drodrigue-solace closed 6 months ago
v0.8.x only supports react query v5. we're setting enabled to true for all suspense queries to be consistent with react query v5.
I can understand that if enabled
is not specified, the code can set it to true, but it seems I still should be able to control that somehow. Obviously I don't know all the internal details and behaviours of react-query.
enabled
can not be set with a suspense query. As with a suspense query the data must be there. It has to be available. Suspense forces you in a way to structure you app like that. The thing is here are the typings wrong as the enabled option should not be accessible in a suspense query.
Closing issue
When using
atomWithSuspenseQuery()
with afalse
for theenabled
option, the query is executed anyway. It should be executed only if the enabled option is true.e.g.
I would have expected that the query stay pending until the
enabledAtom
is set totrue
in the example above.Tested with: