Skip to content

Descendant registry publishes state during effect commit #8606

Description

@alexus37

Description

Primer's descendant registry registers and updates descendants from effects and publishes registry state synchronously from those effect paths. ActionList-heavy pages can therefore schedule registry updates during commit and produce cascading follow-up renders.

Expected behavior: descendant registration, value updates, cleanup, and ordering should be batched outside effect commit without stale entries or lost updates.

Steps to reproduce

  1. Render an ActionList/ActionMenu tree with many descendants in a React 19 profiling build.
  2. Mount, update, and unmount descendant items.
  3. Record the commit/effects tracks.
  4. Observe registry state publication originating from descendant effects.

Version

@primer/react 38.42.0

Browser

Chrome

Acceptance criteria

  • Preserve stable ordering and descendant metadata.
  • Cover rapid mount/unmount and update/unregister ordering.
  • Avoid state publication directly from effect commit.
  • Fix this in Primer React rather than requiring a downstream patch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions