Skip to content

fix(solid): avoid hydrating refresh registration - #2921

Closed
brenelz wants to merge 2 commits into
solidjs:nextfrom
brenelz:fix/refresh-lazy-hydration
Closed

fix(solid): avoid hydrating refresh registration#2921
brenelz wants to merge 2 commits into
solidjs:nextfrom
brenelz:fix/refresh-lazy-hydration

Conversation

@brenelz

@brenelz brenelz commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • store Solid Refresh component pointers in a plain signal instead of a function-valued writable memo
  • keep module-level refresh registration out of hydration serialization and child ID allocation
  • cover ownerless registration and hydration ID preservation

Tests

  • pnpm test in packages/solid (488 passed)
  • pnpm test-types in packages/solid
  • Prettier check and git diff --check

Fixes #2920

@changeset-bot

changeset-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 39ceacb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
solid-js Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
@solidjs/universal Patch
@solidjs/web Patch
test-integration Patch
babel-preset-solid Patch
@solidjs/signals Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codspeed-hq

codspeed-hq Bot commented Jul 19, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by ×2.2

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 120 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
merge 165.1 µs 73.4 µs ×2.2

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing brenelz:fix/refresh-lazy-hydration (39ceacb) with next (ec432b4)

Open in CodSpeed

@ryansolid

Copy link
Copy Markdown
Member

Thanks @brenelz! A fix for #2920 was already in flight locally, but your plain-signal approach is cleaner — no writable memo, nothing hydration-aware to work around — so I adopted it. It just landed on next with your co-author credit: b1b2f82. Your "does not consume a hydration child id" test came along too. The related hydration-timing fix for #2919 landed alongside it. Both will be in the next beta.

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.

2 participants