Open jessepearson opened 3 years ago
Why do we want to stop using @wordpress/data-controls
?
As far as I understood, @wordpress/data-controls
uses @wordpress/api-fetch
, but uses the generator pattern, which makes the entire project depend on its yieldable behavior. It will require a major refactor to get rid of it.
I checked the PR that references this issue and it appears there was a little more discussion about it here: https://github.com/Automattic/woocommerce-payments/pull/1437#pullrequestreview-635790371
Basically the dispatch
in data-controls
was deprecated, which makes it seem like apiFetch
could be, as well. It appears the issue to refactor dispatch
is still open: https://github.com/Automattic/woocommerce-payments/issues/1574
This issue impacts Release Process, Monitoring (including On-call process ownership), MC Tools, Dev Tools, CI/CD Pipeline, and Dependencies Management, so assigning to Harmony (based on team responsibilities Pc2DNy-3z-p2) @deepakpathania. Assigning as part of Gamma Triage process PcreKM-yM-p2.
Tagging as part of re-evaluating older issues in the backlog, please have a look and close if no longer relevant.
apiFetch
is available in@wordpress/api-fetch
, and we are using it from@wordpress/data-controls
. It is not yet deprecated, but it may be best to refactor when possible.https://developer.wordpress.org/block-editor/reference-guides/packages/packages-api-fetch/