TanStackT
TanStack2y ago
4 replies
constitutional-coral

Use enabled prop for type narrowing

Simple question: Would it be feasible to use the 'enabled' prop to narrow down the type of variables used in the fetch function?

Codesandbox to show the issue:
https://codesandbox.io/p/sandbox/billowing-thunder-qwdy98?file=%2Fsrc%2FApp.tsx%3A2%2C37
Was this page helpful?