Closed DustinJSilk closed 1 year ago
could you provide a simpler repo case? just a component with a button that triggers the issue?
Sure give me 5 minutes and ill push an update
Managed to reproduce with this:
export const Title = component$((props: TitleProps) => {
const Tag = props.tag ?? "h1";
return (
<Tag>
Hello {Tag}
</Tag>
);
});
export const Issue3398 = component$(() => {
const tag = useSignal<"h1" | "h2">("h1");
return (
<div>
<button onClick$={() => tag.value = tag.value === "h1" ? "h2" : "h1"}>Toggle tag</button>
<Title tag={tag.value}></Title>
</div>
);
});
working on a fix!
You beat me to it! haha Awesome thanks @manucorporat !
Which component is affected?
Qwik Runtime
Describe the bug
After upgrading to the latest dev release of Qwik and Qwik city (0.22 & 0.6.1), using a dynamic element tag causes a breaking error to be thrown when the dom updates.
For example, this no longer works:
Reproduction
https://github.com/DustinJSilk/qwik-issue-custom-tag/blob/main/src/routes/flower/layout.tsx
Steps to reproduce
Please see the layout file linked in the reproduction url.
install and run the app, and navigate through the pages. See errors in the console.
System Info
Additional Information
This was working on the previous latest versions