-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Latest Posts block: Refactor to drop apiFetch usage in favor of using the data module #33063
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
Conversation
|
Size Change: -6 B (0%) Total Size: 1.06 MB
ℹ️ View Unchanged
|
jorgefilipecosta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Things worked well on my tests 👍 I tested the category autocomplete and the user select field of the latest posts block.
| } ) | ||
| } | ||
| authorList={ authorList } | ||
| authorList={ authorList ?? [] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Maybe we can use a shared EMPTY_ARRAY reference to avoid rerenders.
1d94efb to
e3eeb7f
Compare
… the data module (#33063)
I'm just continuing my refactors to remove the usage of apiFetch in block-library and editor packages to make these two packages WP-agnostic (considering the data module an adaptable interface to any backend)
Testing instructions