Skip to content

fix(runtime): PropSerialize not called for JSX props before instance creation#6558

Merged
johnjenkins merged 1 commit intostenciljs:mainfrom
Jagget:PropSerialize
Jan 22, 2026
Merged

fix(runtime): PropSerialize not called for JSX props before instance creation#6558
johnjenkins merged 1 commit intostenciljs:mainfrom
Jagget:PropSerialize

Conversation

@Jagget
Copy link
Contributor

@Jagget Jagget commented Jan 22, 2026

Props with @PropSerialize set via JSX before lazy instance creation did not have serialized values reflected to DOM attributes.

Cause

In set-value.ts, serializer logic was wrapped in if (instance && ...), skipping serialization when instance was undefined.

Solution

Queue serialization to $fetchedCbList$ when instance doesn't exist, following the pattern used for @Watch callbacks.

Files Changed

  • src/runtime/set-value.ts - Queue serializer when no instance
  • src/runtime/test/prop-serialize.spec.tsx - Added regression test

@Jagget Jagget requested a review from a team as a code owner January 22, 2026 15:46
@johnjenkins johnjenkins added this pull request to the merge queue Jan 22, 2026
Merged via the queue into stenciljs:main with commit 88b3315 Jan 22, 2026
69 checks passed
@Jagget Jagget deleted the PropSerialize branch January 22, 2026 18:33
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