Describe the bug
I am not sure if it's really a defect :)
Sync to master branch and below code does not work as before if not adding below line. I wonder if there are any design change.
It seems that code inside the closure is not tracked.
let a = run; // must be added
My code:
let exec = move |event: Event| {
run.set(true);
};
create_effect(cx, {
let a = run; // must be added
move || {
// will not called if not above line
// Actions
run.set(false);
}
});
view! {cx,
// RUN
div (class="flex flex-row-reverse p-1 w-4/5") {
div (class="flex-initial pl-3") {
button (
type="button",
on:click=exec
)
}
}
}
Describe the bug I am not sure if it's really a defect :)
Sync to master branch and below code does not work as before if not adding below line. I wonder if there are any design change. It seems that code inside the closure is not tracked.
My code:
Environment