#Use enabled prop for type narrowing

4 messages · Page 1 of 1 (latest)

fallen jacinth
weary trout
#

The problem with this is that in both cases id refers to the id in the props which can be undefined. There's no connection between the enabled check and the id you pass to the queryFn. TS simply can not narrow this property.