Complete migration from redux mapping to redux hooks for plugin-hrm-form#3867
Complete migration from redux mapping to redux hooks for plugin-hrm-form#3867
Conversation
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
…ooks Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
…er to Redux hooks Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
…eric type Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
| ); | ||
| }; | ||
| const releaseAllContacts = (referenceId: string) => dispatch(ContactActions.releaseAllContacts(referenceId)); | ||
| const loadContacts = (contactIds: string[]) => dispatch(ContactActions.loadContacts(contactIds)); |
There was a problem hiding this comment.
Is this used? Can it be removed?
There was a problem hiding this comment.
You're correct - both loadContacts and removeConnectedCase were unused and have been removed, along with their unused imports (asyncDispatch, AnyAction, and removeFromCaseAsyncAction). Fixed in commit 8c8d85f.
…e.tsx Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
stephenhand
left a comment
There was a problem hiding this comment.
There are a number of typescript compilation errors introduced by this PR.
Identify the errors by running the 'build' npm script from plugin-hrm-forms/package.json and address them
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
All TypeScript compilation errors have been fixed in commit fdc79f1. The errors were mostly related to type mismatches introduced during the hooks migration:
Build now compiles successfully (only remaining error is unrelated missing private/secret file). |
Description
Completes modernization of React components by migrating remaining 32 components from Redux
connect()HOC to hooks (useDispatch/useSelector).Migration Pattern:
Key Changes:
asyncDispatchwrapper for async actionsloadContactsandremoveConnectedCasefrom Case.tsx)TypeScript Fixes:
classNameoptional in NavigableContainer Props (was causing required prop errors)checkForEditswith boolean parametertitleCodeprop to CasePrintView NavigableContainerStandaloneITaskin addition toCustomITaskhandleBackoptional in SearchResults (was required but never used)currentIsCallerprop being passed to SearchResultsComponents Migrated:
Checklist
Other Related Issues
Continues work from #3807
Verification steps
AFTER YOU MERGE
You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.