-
Hey! When I go to upgrade from 2.26.4 to 3.x, I see the following TypeScript error in my build.
This worked OK until v3, any advice what to do? Thanks! EDIT: This is how I define const queryFn = useMemo(() => {
switch (type) {
case '1':
return getMyQuery1;
case '2':
return getMyQuery2;
case '3':
default:
return getMyQuery3;
}
}, [type]); |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I think this depends how your |
Beta Was this translation helpful? Give feedback.
-
Think it is because the query functions do not expect the new query context: https://react-query.tanstack.com/guides/migrating-to-react-query-3#query-key-partspieces-are-no-longer-automatically-spread-to-the-query-function |
Beta Was this translation helpful? Give feedback.
Think it is because the query functions do not expect the new query context: https://react-query.tanstack.com/guides/migrating-to-react-query-3#query-key-partspieces-are-no-longer-automatically-spread-to-the-query-function