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

Backport Gutenberg data API store registration and access #9329

Closed
IreneStr opened this issue Mar 23, 2018 · 1 comment
Closed

Backport Gutenberg data API store registration and access #9329

IreneStr opened this issue Mar 23, 2018 · 1 comment
Assignees

Comments

@IreneStr
Copy link
Contributor

IreneStr commented Mar 23, 2018

Current situation

The Gutenberg data API has an option to register your own store. We'd like to use this to add our own state with the data we need for our sidebar. However, this API is only available in Gutenberg, while we'll move to the sidebar in the classic editor as well.

Ideal situation

Eventually, WordPress should backport the data API to the classic editor to have the same functionality.

Temporary solution

However, there is currently no backporting of this API in WordPress. Therefore we should create the backporting ourselves.

What does it look like in Gutenberg?

Gutenberg's registerStore expects two arguments: a name, and an object containing a reducer function, an actions object, a selectors object, and a resolvers object. See https://github.com/WordPress/gutenberg/blob/master/data/README.md .

What needs to happen?

We should make sure that we can use and register a store in the classic editor exactly the same way as in Gutenberg.

Please branch from feature/content-analysis-in-sidebar

@atimmer
Copy link
Contributor

atimmer commented Mar 28, 2018

Riad suggested to take a look at https://github.com/youknowriad/standalone-gutenberg to see how to make this possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants