On the project that we are developing, I have the task of optimizing the application, including using optimization. Wrote this piece of code...
const {
searchSupported,
searchPaginationQuery,
searchModalTableColumns,
textFieldAccessor,
searchSourceContext,
} = useMemo(() => searchHelp, [searchHelp]);
Tell me, how THIS CODE makes sense?
And if anyone understood, tell me how well destructuring works with useMemo ().
Thanks in advance!
Expected Result:
Variables searchSupported, searchPaginationQuery, searchModalTableColumns, textFieldAccessor, searchSourceContext are memoized.