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
Labels
Comments
2 tasks
Riad suggested to take a look at https://github.com/youknowriad/standalone-gutenberg to see how to make this possible. |
2 tasks
2 tasks
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: