I managed to get a possible solution already though. I created a custom function that has derived inside its closure and returns
get current {
return derived_state;
}
Unsure it's ideal performance-wide though..
I managed to get a possible solution already though. I created a custom function that has derived inside its closure and returns
get current {
return derived_state;
}
Unsure it's ideal performance-wide though..
const { my_state } = use_context();
my_state.current = 1;
However, trying to do that with a $derived exported using a getter breaks the reactivity. Is there any way how to box the $deriveds?
const { my_state } = use_context();
my_state.current = 1;
However, trying to do that with a $derived exported using a getter breaks the reactivity. Is there any way how to box the $deriveds?