Skip to content

Update explanation of batched updates. - #13779

Open
JakePT wants to merge 1 commit into
developfrom
enhancement/6818-async-actions-comment
Open

JakePT wants to merge 1 commit into
developfrom
enhancement/6818-async-actions-comment

Conversation

@JakePT

@JakePT JakePT commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Related issue(s):

Relevant technical choices

Confirmed with the installed React 17 and WordPress datastore: three setters produced one render in a React click handler, three after an await or resumed generator, and one when combined. Store updates remained synchronous, consistent with React’s batching documentation.

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.
  • Ensure there are no unexpected significant changes to file sizes.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

@JakePT
JakePT marked this pull request as ready for review October 5, 2026 08:03
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

🤖 This comment is automatically updated by CI workflows. Each section is managed independently.

🎭 Playwright reports for 148d9aa:

📚 Storybook for 148d9aa:

📦 Build files for 148d9aa:

🖼️ VRT report for 148d9aa:

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation in assets/js/modules/analytics-4/datastore/properties.js by replacing an inline comment with a detailed JSDoc comment block. The updated comment explains React 17's batching behavior within event handlers versus asynchronous controls, clarifying why certain Google tag settings are dispatched together to prevent mismatched requests. There are no review comments, and I have no feedback to provide.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify the cause of "asynchronously handled actions" dispatched from a function that has effectively awaited.

1 participant