Skip to content

feat: support iterable JSX children - #3320

Open
nickshiro wants to merge 1 commit into
solidjs:nextfrom
nickshiro:fix/3054-iterable-children
Open

feat: support iterable JSX children#3320
nickshiro wants to merge 1 commit into
solidjs:nextfrom
nickshiro:fix/3054-iterable-children

Conversation

@nickshiro

Copy link
Copy Markdown

Summary

ref #3054

Support finite synchronous iterables as JSX children.

  • Normalize iterable children into arrays before reconciliation.
  • Recursively flatten iterables nested inside arrays and other iterables.
  • Preserve reactive reconciliation semantics: nodes retained between iterable updates keep their identity.
  • Add SSR handling for iterable children, including nested iterables.
  • Add hydration coverage to ensure SSR-rendered iterable children hydrate without replacing existing DOM text nodes.
  • Add universal renderer coverage.

How did you test this change?

  • pnpm --filter @solidjs/web exec vitest run test/runtime/insert.spec.js --reporter=dot
  • pnpm --filter @solidjs/web exec vitest run --config vite.config.server.mjs test/server/iterable-children.spec.tsx --reporter=dot
  • pnpm --filter @solidjs/web exec vitest run --config vite.config.hydrate.mjs test/hydration/iterable-children.spec.tsx --reporter=verbose
  • pnpm --filter @solidjs/universal exec vitest run test/runtime-insert.spec.js --reporter=dot
  • pnpm --filter @solidjs/signals types
  • pnpm --filter @solidjs/web types

@changeset-bot

changeset-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c71ea56

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

This PR includes changesets to release 11 packages
Name Type
@solidjs/signals Patch
@solidjs/universal Patch
@solidjs/web Patch
test-integration Patch
@solidjs/babel-plugin Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/html Patch
@solidjs/compiler Patch
@solidjs/diagnostics Patch
solid-js 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 Sep 9, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 18.14%

⚡ 1 improved benchmark
✅ 141 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
color-picker: 14 colors (renderToString) 771.4 µs 653 µs +18.14%

Tip

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


Comparing nickshiro:fix/3054-iterable-children (c71ea56) with next (8cfa272)

Open in CodSpeed

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.

1 participant