How to reduce the number of recalculations of the same params passed to the hook that is used in many places? #5367
Unanswered
PetrovaDaria
asked this question in
Q&A
Replies: 1 comment
-
Hi 👋 You can use useMemo here to cache the formatted fields. |
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.
-
I have a general query hook that fetches data and a wrapper hook over him for specific form. Wrapper hook generates params from form values and translates result to query hook arguments. This wrapper hook is used in many places in the form (real number is 16 times). And therefore it N times does the same transformations with params.
The question is - how to reduce the generation of params from N times to 1 time?
Beta Was this translation helpful? Give feedback.
All reactions