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

Framework: Restrict combineReducers usage to data module #16752

Merged
merged 2 commits into from Jul 25, 2019

Conversation

@aduth
Copy link
Member

commented Jul 25, 2019

This pull request seeks to replace a reference to Redux's combineReducers in @wordpress/core-data with the equivalent utility exported from @wordpress/data. In so doing, it includes a new project-level ESLint syntax restriction to enforce this usage. The proposed benefit of this change is to ensure consistency, leverage performance benefits from #11255, and avoid bundling multiple copies of a combineReducers utility. Furthermore, the core-data package never defined an explicit dependency on redux and thus was only incidentally able to be built without errors.

Testing Instructions:

Ensure unit tests pass:

npm run test-unit

Ensure lint passes:

npm run lint-js
@youknowriad
Copy link
Contributor

left a comment

Good catch

@aduth aduth merged commit bd4c495 into master Jul 25, 2019

1 of 7 checks passed

Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Milestone It Milestone It
Details
Travis CI - Pull Request Build Passed
Details

@aduth aduth deleted the remove/redux branch Jul 25, 2019

@youknowriad youknowriad added this to the Gutenberg 6.2 milestone Jul 26, 2019

sbardian added a commit to sbardian/gutenberg that referenced this pull request Jul 29, 2019

Framework: Restrict combineReducers usage to data module (WordPress#1…
…6752)

* Core Data: Use combineReducers from data module

* Framework: Restrict combineReducers usage to data module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.