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

Data Module Side Effects: From effects to generators #25643

Closed
youknowriad opened this issue Sep 25, 2020 · 1 comment
Closed

Data Module Side Effects: From effects to generators #25643

youknowriad opened this issue Sep 25, 2020 · 1 comment
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Data /packages/data [Type] Code Quality Issues or PRs that relate to code quality [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@youknowriad
Copy link
Contributor

Right now in the Gutenberg project, side projects triggered when store actions are triggered can be written in two ways:

  • The lagacy way: refx middleware and effects. (See effects.js files)
  • The new way: action creators written as Generators + controls.

The refx approach suffers from some issues. For instance the effects are not recreated for each BlockEditorProvider Example here https://github.com/Automattic/p2tenberg/pull/451

So ideally, we'd refactor all the existing effects to use the new approach and at the end remove the refx middleware entirely.

I know @nerrad and @ZebulanStanphill did work on some of this previously, and I'm creating this issue as tracking issue to invite all contributors to participate in the efforts.

@youknowriad youknowriad added Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Data /packages/data [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. labels Sep 25, 2020
@mtias mtias added the [Type] Code Quality Issues or PRs that relate to code quality label Sep 25, 2020
@youknowriad
Copy link
Contributor Author

I think this is complete now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Data /packages/data [Type] Code Quality Issues or PRs that relate to code quality [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
None yet
Development

No branches or pull requests

2 participants