resolveSelect doesn't work inside data store resolvers, select throws warnings #68679
Open
3 of 6 tasks
Labels
Needs Technical Feedback
Needs testing from a developer perspective.
[Package] Data
/packages/data
[Type] Bug
An existing feature does not function as intended
Description
Have some custom data stores in a plugin, for some time now our fully TS data store package shows notices of
Ok so I spent a couple hours replacing everything, seems simple enough as
select
just passes through toresolveSelect
.Its currently yield*, but I've tried normal yield as well, await simply doesn't seem to work within generators without lots of extra work wrapping every call with call( async () => {} )**
After swapping them out though, the generators stopped working for all resolvers.
I'm not sure what this deprecated notice is about, but it seems like a misleading notice here, clearly something else happening.
Side note, the typing for the resolveSelect is kinda terrible, why not have it simply return selector for given data store?
We have fully working type overloads for select, dispatch etc for our custom data stores, so I imagine it could be done in core in an interface pretty easily and ready to extend.
Step-by-step reproduction instructions
Consume resolveSelect within a generator for Redux data store resolver. It doesn't work from my testing, but using select which does work throws notices.
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: