Open EatChangmyeong opened 7 months ago
Thank you for the repro, that indeed looks like a bug.
Let me take a look. It would be great if you could offer a clue that off the top of your head about this bug.
Since we have v2 well underway and it rebuilds some of this code, let's wait until we can test this with v2 alpha.
Also I want to point out another related issue with the example app we get after running pnpm create qwik
and choosing the Basic App
starter, the counter there is broken and can reproduced quickly by running pnpm preview
, hitting the "+" button makes the number drops from 70 to 50
Which component is affected?
Qwik Runtime
Describe the bug
I was randomly writing some edge case code (orphaned signals in this case) to see what happens when I first encountered this bug. Trying to reproduce the bug in the playground later revealed that this bug depends on the returned JSX markup.
In the following reproduction,
app.tsx
exports two componentsV1
andV2
, which have different JSX markup (V1
's children are nested in extrap
's) but are otherwise the same.Expected behavior: apart from the visual differences (from not having extra
p
's), both components should show the same behavior, that is:++
and--
buttons should always increment and decrement the counter (both parent's and child's), andChild
rerendering triggers itsuseTask$
.Actual behavior: Once
V2
'sChild
unmounts for the first time, the parent counter gets stuck and no longer updates.V1
does not show this behavior and works as expected.Reproduction
https://qwik.builder.io/playground/#v=1.4.2&f=5Va9DoIwEN55ClwICWAENgKdfATD7oA4kGA0xoH03b3eHW1BEkEdSFz4aa%2FXu%2B%2B7PztoklT7Y0dNaNovfmJhY%2BpoeU5cEQ5lDChMhhbtY3mvrnumrjBX%2BzswuBeDijnYGx6zBc%2Ftg0q3LX46NrcKpfqAZmAuBkscckxv78hSuHgLiX%2Bv6BlFUkSRHon4cDeSksuUBoEUQTBUqpJsrom9y6QNHN%2BMlqQ4tHXdVK92j456npsTemBiodySEFHkDlsEsUTJP%2BI5WTXPn7M7ze03zP6YxgUkMneOQxj2%2BNm0dUiBzJA6%2BMw443N%2B0YwnBKiZJHiCWT1yg3IaoM1Zl1Z8uAll8U4NAOtUGyri7HbU8R4j8789KYlT41kZhyoTjTVraU3QBnRnUr%2FJ%2B0b1BA
Steps to reproduce
No response
System Info
Additional Information
No response