Closed JuoCode closed 10 months ago
Yeah we've typically used the symbol disableQuery
to indicate a disabled query. The disableQuery
symbol makes it easier to guarantee typesafety on the input combined with a valid query function. To make that more explicit, we should probably remove the enabled
prop as a possible input since it's generated based on input
.
On closer examination of this, I think it would be consistent to still support the enabled option along with the explicit disableQuery
since it will lead to less ternaries all over the place. Opened #318 to add this in.
https://github.com/connectrpc/connect-query-es/blob/94ee6e86abbb7fc497c88d5900de457cfc9eb688/packages/connect-query/src/use-query.ts#L61-L64
I think that's the problem.