Closed mlqn closed 1 month ago
Studio currently uses several different debounce mechanisms. We should select one and remove the others to keep it consistent.
react-use
https://github.com/Altinn/altinn-studio/blob/a5d9253df8d8736161aad9068ab57d02d8503310/frontend/dashboard/pages/Dashboard/Dashboard.tsx#L15
https://github.com/Altinn/altinn-studio/blob/a5d9253df8d8736161aad9068ab57d02d8503310/frontend/packages/shared/src/hooks/useDebounce.ts#L4
https://github.com/Altinn/altinn-studio/blob/a5d9253df8d8736161aad9068ab57d02d8503310/frontend/packages/ux-editor/src/containers/FormItemContext.tsx#L143
No response
Change all occurrences of debounce to use alternative nr. 2 😄 Also, move the useDebounce function to @studio/pure-functions package.
debounce
useDebounce
@studio/pure-functions
Tested OK in dev!
Description
Studio currently uses several different debounce mechanisms. We should select one and remove the others to keep it consistent.
react-use
hookhttps://github.com/Altinn/altinn-studio/blob/a5d9253df8d8736161aad9068ab57d02d8503310/frontend/dashboard/pages/Dashboard/Dashboard.tsx#L15
https://github.com/Altinn/altinn-studio/blob/a5d9253df8d8736161aad9068ab57d02d8503310/frontend/packages/shared/src/hooks/useDebounce.ts#L4
https://github.com/Altinn/altinn-studio/blob/a5d9253df8d8736161aad9068ab57d02d8503310/frontend/packages/ux-editor/src/containers/FormItemContext.tsx#L143
Additional Information
No response
Tasks
No response
Acceptance Criterias
No response