Replies: 1 comment
-
every approach has its pros and cons, and I've listed them here: https://tkdodo.eu/blog/react-query-data-transformations |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I cant find info on whether i should use the "select" property or normalize the response data inside the queryFn function.
As far as i know, using the queryFn function itself is better for performance because it only happens after the actual response oppose to the "select" which might run on every render.
pseudo examples:
vs
One thing that i thought of for using the select is only when using same key with different select functions(rare on our codebase)
Beta Was this translation helpful? Give feedback.
All reactions