-
Epic
-
Resolution: Done
-
Normal
-
None
-
None
-
Replace class-based React components
-
False
-
-
False
-
Done
-
0% To Do, 0% In Progress, 100% Done
Description
As developers, we want to convert all remaining class-based components to feature-based components(expect for files listed below) so that newer React features (for example, hooks) are used, reduce the amount of code needed for things like Redux, and standardize across the application. This will make updating these components easier in the future.
Acceptance criteria
- The use of class-based components (for example:
class MyComponent extends React.Component<Props>...
will no longer be used in the close base. Searching for the pattern above in the code base will only return match files listed in the "Out of scope" section below
- All unit/Cypress tests will pass
Out of scope
Refactoring into TypeScript, adding/improving unit tests, moving from Redux to React Query.
Changes to functionality, behavior, or visual changes.
There are a couple of files that will not be addressed by this epic because of the complexity and/or wide reaching implications. These files include:
- src/chrome-main.tsx
- src/testUtils.test.tsx
- files inside of `src/components/dashboard/`
Testing implications
Many of the files impacted are spread across the application so testing may impact numerous areas of the application.
There are no expected changes to the user experience, so no new tests are expected to be needed nor will tests need to be modified.
In theory, only existing automated unit and e2e test runs are needed, but manual testing needs will be determined by the QE experts.
------------------------------------------------------------------------------------------------------------------------
Implementation notes
There are approximately 61 files that need to be modified - see classToFunctionalList.txt for a list. Not that this may be out of date.
Many of the files are the install pages that are nearly identical except for static content.
Original (and very outdated) list of components (noting for historical reasons): https://docs.google.com/spreadsheets/d/14JEFiUDW5ejc2hv2RCXdCvCobiuEy38TV9mHto8upgI/edit#gid=0 (may be outdated)