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

Interactivity API Docs: Add async actions documentation. #59401

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

cbravobernal
Copy link
Contributor

What?

Developers will first try to use async/await on their actions. And the best way not to get wrong getContext() values is by using generators instead.

@cbravobernal cbravobernal added [Type] Developer Documentation Documentation for developers [Packages] Interactivity /packages/interactivity labels Feb 27, 2024
@cbravobernal cbravobernal self-assigned this Feb 27, 2024
Copy link

github-actions bot commented Feb 27, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: c4rl0sbr4v0 <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing I worry about here is that we have the full code example of what not to do.

In reality we often use documentation not to read all of it but to do a find and replace of something we are looking for.

I'm a little worried that having the incorrect code example in this would actually lead to more people missing the context outside of the code example and assume it is right.

Because of that I would almost say let's remove that code example and only describe it.

But that is just my thought on the matter :) definitely not blocking feedback

@cbravobernal
Copy link
Contributor Author

The only thing I worry about here is that we have the full code example of what not to do.

In reality we often use documentation not to read all of it but to do a find and replace of something we are looking for.

I'm a little worried that having the incorrect code example in this would actually lead to more people missing the context outside of the code example and assume it is right.

Because of that I would almost say let's remove that code example and only describe it.

But that is just my thought on the matter :) definitely not blocking feedback

Sure, let's avoid copy-pasta issues, I've been on the same boat of copying first, read later 😅

@cbravobernal cbravobernal enabled auto-merge (squash) February 27, 2024 14:18
@cbravobernal cbravobernal merged commit aed2709 into trunk Feb 27, 2024
56 checks passed
@cbravobernal cbravobernal deleted the docs/interactivity-add-async branch February 27, 2024 14:48
@github-actions github-actions bot added this to the Gutenberg 17.9 milestone Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Packages] Interactivity /packages/interactivity [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants