LocalResource + Transition in Leptos 0.8 does not trigger reactivity properly #3935
-
Hi! I think I’m running into a regression or an unexpected behavior since upgrading to Leptos 0.8 related to I have the following use case: I’m using I wrap the display logic in a When However, even though Here’s what I confirmed so far:
Questions
Here my code :
Thank you for your help 🙏! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
From your description, it sounds like a bug. If you could open an issue with a minimal reproduction/small, self-contained example, that would be helpful! |
Beta Was this translation helpful? Give feedback.
Hi!
After some deeper investigation, I realized that the issue was actually on my side.
In my
LocalResource
, I was callingreload.set(false);
, which obviously causes the resource to re-run every time because the signal is being modified during its execution.This causes an endless loop.
However, what still confuses me is that this exact same code used to work fine in Leptos 0.7.8 and only broke after updating to 0.8.0.
So the real question/issue is:
Why did this pattern work before, even though it probably shouldn't have?
It seems like this might have been undefined behavior before, which is now being handled more strictly.
Also, since I’m here, I’d like to ask:
What would be the recommen…