You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify the cause of "asynchronously handled actions" dispatched from a function that has effectively awaited. #6818
The previous issue #6784 dealt with the scenario where multiple Redux actions dispatched in a function that has awaited, or from a generator function that has been re-entered after an await, resulted in multiple React renders, whereas the same actions dispatched in a regular function (specifically, in a click handler) resulted in a single update.
It wasn't immediately clear what the reason was, but it was subsequently noticed that the likely cause is React's own state update batching functionality. For more in this, see this article.
We should verify this is indeed the cause, and update the related inline comment for accuracy.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
The cause of the "asynchronously handled actions" described above should be confirmed, and the referenced inline comment should be updated to reflect this understanding.
Implementation Brief
In assets/js/modules/analytics-4/datastore/properties.js:
Update the comment above the final setSettings() call in *updateSettingsForMeasurementID() to explain:
React 17 batches updates within React event handlers, but does not automatically batch updates after an asynchronous continuation.
Plain actions still update the store synchronously; separate dispatches after an await, including a generator resumed after an asynchronous control, can cause separate renders.
Setting googleTagAccountID, googleTagContainerID, and googleTagID in one action prevents GoogleTagIDMismatchNotification from rendering with mismatched settings and requesting incorrect container destinations.
Retain the existing references documenting the original fix. Describe the earlier setSettings() call as keeping related settings together without implying that its branch has already awaited.
Activity
JakePT commentedon Oct 5, 2026
Small inline-documentation-only change so I opened a PR alongside adding the IB.
techanvil commentedon Oct 30, 2026
IB ✅