-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Hello.
Given the heavy investment in WordPress's data module, especially in the context of the development of the Block Editor, has it been considered for supporting for the Consent API's client-side interface?
Stores under wp.data support subscribe, select and dispatch. There are a couple of benefits to it, from useful deprecation mechanisms for backwards compatibility, to the fact that consumers of the API may choose to consume it via a traditional "subscribe and dispatch" design, or declaratively from within wp.element-powered UIs (cf. useSelect). There are also affordances in place for client-side persistence of preferences.
Of course, the drawback to consider is the addition of dependencies.
I'm interesting in hearing how you weigh this approach against the current event-based one.