-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the bug
I have a super strange bug in my project and I was able to reduce it down to the provided REPL.
If you click the buttons A and B multiple times, the content of the #if block does not get changed anymore.
If you remove one of the lines that I describe in comments, the bug is gone.
The most easy fix is - of course - not having any unused variables. But that was not easy to spot in a big refactoring and maybe this points to a underlying problem.
Update 1
This is not so edge-casy as I thought. I have the same issue even with no unused state variables in a more complex setup. Much harder to reproduce unfortunately. I will give it another try...
Update 2
The problem is definitely related to the filter function in the $derived prop.
This workaround works: REPL without $derived
Reproduction
Logs
No response
System Info
REPLSeverity
annoyance