-
Notifications
You must be signed in to change notification settings - Fork 87
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
tn3rb
merged 346 commits into
FET/editor-dates-tickets-refactor
from
EDTR/convert-more-HOCs-2-func
Sep 13, 2019
Merged
Convert Classes and HOCs to Functional Components and Hooks #1589
tn3rb
merged 346 commits into
FET/editor-dates-tickets-refactor
from
EDTR/convert-more-HOCs-2-func
Sep 13, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bumps [@wordpress/hooks](https://github.com/WordPress/gutenberg/tree/HEAD/packages/hooks) from 2.4.0 to 2.5.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/hooks/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/hooks) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/hooks from 2.4.0 to 2.5.0 (#1473) Bumps [@wordpress/hooks](https://github.com/WordPress/gutenberg/tree/HEAD/packages/hooks) from 2.4.0 to 2.5.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/hooks/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/hooks) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/browserslist-config](https://github.com/WordPress/gutenberg/tree/HEAD/packages/browserslist-config) from 2.5.0 to 2.6.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/browserslist-config/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/browserslist-config) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/browserslist-config from 2.5.0 to 2.6.0 (#1474) Bumps [@wordpress/browserslist-config](https://github.com/WordPress/gutenberg/tree/HEAD/packages/browserslist-config) from 2.5.0 to 2.6.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/browserslist-config/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/browserslist-config) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/api-fetch](https://github.com/WordPress/gutenberg/tree/HEAD/packages/api-fetch) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/api-fetch/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/api-fetch) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/api-fetch from 3.3.0 to 3.4.0 (#1475) Bumps [@wordpress/api-fetch](https://github.com/WordPress/gutenberg/tree/HEAD/packages/api-fetch) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/api-fetch/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/api-fetch) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/scripts/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/scripts) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/scripts from 3.3.0 to 3.4.0 (#1476) Bumps [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/scripts/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/scripts) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/block-library](https://github.com/WordPress/gutenberg/tree/HEAD/packages/block-library) from 2.6.0 to 2.7.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/block-library/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/block-library) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/block-library from 2.6.0 to 2.7.0 (#1478) Bumps [@wordpress/block-library](https://github.com/WordPress/gutenberg/tree/HEAD/packages/block-library) from 2.6.0 to 2.7.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/block-library/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/block-library) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 22.14.1 to 22.15.0. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md) - [Commits](jest-community/eslint-plugin-jest@v22.14.1...v22.15.0) Signed-off-by: dependabot-preview[bot] <[email protected]>
…nt-plugin-jest from 22.14.1 to 22.15.0 (#1479) Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 22.14.1 to 22.15.0. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md) - [Commits](jest-community/eslint-plugin-jest@v22.14.1...v22.15.0) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/data](https://github.com/WordPress/gutenberg/tree/HEAD/packages/data) from 4.6.0 to 4.7.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/data/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/data) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/data from 4.6.0 to 4.7.0 (#1480) Bumps [@wordpress/data](https://github.com/WordPress/gutenberg/tree/HEAD/packages/data) from 4.6.0 to 4.7.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/data/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/data) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/dependency-extraction-webpack-plugin](https://github.com/WordPress/gutenberg/tree/HEAD/packages/dependency-extraction-webpack-plugin) from 1.0.1 to 1.1.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/dependency-extraction-webpack-plugin/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/dependency-extraction-webpack-plugin) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/dependency-extraction-webpack-plugin from 1.0.1… (#1481) Bumps [@wordpress/dependency-extraction-webpack-plugin](https://github.com/WordPress/gutenberg/tree/HEAD/packages/dependency-extraction-webpack-plugin) from 1.0.1 to 1.1.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/dependency-extraction-webpack-plugin/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/dependency-extraction-webpack-plugin) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/editor](https://github.com/WordPress/gutenberg/tree/HEAD/packages/editor) from 9.4.0 to 9.5.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/editor/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/editor) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/editor from 9.4.0 to 9.5.0 (#1482) Bumps [@wordpress/editor](https://github.com/WordPress/gutenberg/tree/HEAD/packages/editor) from 9.4.0 to 9.5.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/editor/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/editor) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/date](https://github.com/WordPress/gutenberg/tree/HEAD/packages/date) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/date/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/date) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/date from 3.3.0 to 3.4.0 (#1483) Bumps [@wordpress/date](https://github.com/WordPress/gutenberg/tree/HEAD/packages/date) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/date/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/date) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/babel-plugin-makepot](https://github.com/WordPress/gutenberg/tree/HEAD/packages/babel-plugin-makepot) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/babel-plugin-makepot/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/babel-plugin-makepot) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/babel-plugin-makepot from 3.1.0 to 3.2.0 (#1484) Bumps [@wordpress/babel-plugin-makepot](https://github.com/WordPress/gutenberg/tree/HEAD/packages/babel-plugin-makepot) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/babel-plugin-makepot/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/babel-plugin-makepot) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/i18n](https://github.com/WordPress/gutenberg/tree/HEAD/packages/i18n) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/i18n/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/i18n) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/i18n from 3.5.0 to 3.6.0 (#1485) Bumps [@wordpress/i18n](https://github.com/WordPress/gutenberg/tree/HEAD/packages/i18n) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/i18n/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/i18n) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/compose](https://github.com/WordPress/gutenberg/tree/HEAD/packages/compose) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/compose/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/compose) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/compose from 3.4.0 to 3.5.0 (#1486) Bumps [@wordpress/compose](https://github.com/WordPress/gutenberg/tree/HEAD/packages/compose) from 3.4.0 to 3.5.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/compose/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/compose) Signed-off-by: dependabot-preview[bot] <[email protected]>"
Bumps [@wordpress/components](https://github.com/WordPress/gutenberg/tree/HEAD/packages/components) from 8.0.0 to 8.1.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/components/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/components) Signed-off-by: dependabot-preview[bot] <[email protected]>
…dpress/components from 8.0.0 to 8.1.0 (#1487) Bumps [@wordpress/components](https://github.com/WordPress/gutenberg/tree/HEAD/packages/components) from 8.0.0 to 8.1.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/master/packages/components/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/components) Signed-off-by: dependabot-preview[bot] <[email protected]>"
…orrect variable (#1477) "
joshfeck
approved these changes
Sep 12, 2019
will fix unit tests in EDTR/master after merge so that Rafael can start on other EDTR issues |
This was referenced Sep 18, 2019
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
with-copy-ticket.js
#1509useDispatch
anduseSelect
hooks in the TAM composition #1525How has this been tested
monkey based browser testing only