Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Classes and HOCs to Functional Components and Hooks #1589

Merged
merged 346 commits into from
Sep 13, 2019

Conversation

tn3rb
Copy link
Member

@tn3rb tn3rb commented Sep 12, 2019

Problem this Pull Request solves

The bulk of the EDTR work was done prior to React releasing Hooks. Therefore most if not all of the non-presentational logic was either in HOCs or embedded in the components themselves, and all localized state was implemented within class components. This resulted in some unnecessary code duplication but also in too may properties having to "trickle down" through the component tree causing an inordinate amount of re-renders.

This pull request refactors many of the EDTR class components into functional components and extracts much of the non-presentational logic into Hooks allowing for greater re-usability and more direct use which prevents prop trickle down.

Since many of the outstanding issues in the EDTR were likely the result of inefficient and/or improper prop passing and misuse of localized state, I have attempted to fix as many of those problems during this refactoring.

These issues include, but are not limited:

How has this been tested

monkey based browser testing only

dependabot-preview bot and others added 30 commits August 7, 2019 19:04
@tn3rb
Copy link
Member Author

tn3rb commented Sep 13, 2019

will fix unit tests in EDTR/master after merge so that Rafael can start on other EDTR issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants