-
Notifications
You must be signed in to change notification settings - Fork 144
WP Data should handle resolution status #4384
Comments
Also should be noted that the current implementation of Resolver state is cached by selector name and arguments. So every time the query argument changes, the resolver will be called. When this happens you could potentially have multiple in flight requests but as soon as one of them is finished It's possible this didn't surface as a bug anywhere because of the way things are currently implemented, but the pattern certainly could produce bugs if used elsewhere. All that to say, it's good you're doing a review of this pattern 👍 |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue was automatically closed due to being stale. Please feel free to re-open it if you still experience this problem. |
This issue was automatically closed due to being stale. Please feel free to re-open it if you still experience this problem. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue was automatically closed due to being stale. Please feel free to re-open it if you still experience this problem. |
Now that things are moving towards wp data, we can remove specific selectors that check for
isSomethingRequesting
and use the built-in selectors in wp data.For example, this call is no longer needed:
woocommerce-admin/packages/data/src/plugins/resolvers.js
Line 71 in e0bab72
And call to check for requesting can be replaced with:
isResolving()
https://github.com/WordPress/gutenberg/blob/1e8d78189a9b05628b171016e102e2c50e267c39/packages/data/src/namespace-store/metadata/selectors.js#L55
This blog post is also a very good overview of some of the available built-in selectors. Big thanks to @nerrad for these suggestions and taking a look at our current implementation.
The text was updated successfully, but these errors were encountered: