4 ms·
I believe this will also obviate a common recommendation to not destructure when using React Query: https://tkdodo.eu/blog/react-query-and-type-script#type-narr
by tshaddox 5y ago
I believe this will also obviate a common recommendation to not destructure when using React Query: https://tkdodo.eu/blog/react-query-and-type-script#type-narrowing https://tkdodo.eu/blog/react-query-and-type-script#type-narr...
- dragosmocrii 5y agoThanks for sharing this. I literally ran into the same issue yesterday, and was wondering why TS can't understand that I am discriminating on the isSucces property.
- tkdodo 5y agoI’ll definitely update that article once the new TS version is released :)