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

Core blocks: Stop using withAPIData for Latest Posts block in code and docs #7397

Closed
gziolo opened this issue Jun 20, 2018 · 2 comments · Fixed by #8584
Closed

Core blocks: Stop using withAPIData for Latest Posts block in code and docs #7397

gziolo opened this issue Jun 20, 2018 · 2 comments · Fixed by #8584
Assignees
Labels
[Feature] Blocks Overall functionality of blocks Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Data /packages/data [Priority] High Used to indicate top priority items that need quick attention [Type] Developer Documentation Documentation for developers

Comments

@gziolo
Copy link
Member

gziolo commented Jun 20, 2018

Raised by @mrleemon in #7390:

It might be a good idea to update the handbook section dedicated to building dynamic blocks cause it still makes reference to withAPIData:

https://wordpress.org/gutenberg/handbook/blocks/creating-dynamic-blocks/

We should refactor Latest Posts block to use withSelect instead of withAPIData and update all docs to follow the same pattern. We are planning to deprecate withAPIData, so let's make sure it is no longer exposed in Gutenberg handbook.

More details on how to perform migration is shared in #7390.

There is also a known bug with a race condition inside withAPIData that has been around for quite some time. This is another reason why we should migrate our codebase sooner than later.

@gziolo gziolo added [Type] Developer Documentation Documentation for developers [Feature] Blocks Overall functionality of blocks Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Data /packages/data labels Jun 20, 2018
@gziolo gziolo added the [Priority] High Used to indicate top priority items that need quick attention label Jun 21, 2018
@ajitbohra ajitbohra self-assigned this Jul 10, 2018
@gziolo
Copy link
Member Author

gziolo commented Jul 23, 2018

Some of usages of withAPIData will be removed in #8088.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Data /packages/data [Priority] High Used to indicate top priority items that need quick attention [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants