`enabled` option does not work as expected
JuoCode opened this issue · comments
connect-query-es/packages/connect-query/src/use-query.ts
Lines 61 to 64 in 94ee6e8
I think that's the problem.
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.