Svelte 5: Is there a way to avoid this $effect using $derived instead?
#11999
Unanswered
frederikhors
asked this question in
Q&A
Replies: 1 comment 3 replies
-
let dataRange = {
get from() { return condition.dateGte },
set from(v) { condition.dateGre = v },
get to() { return condition.dateLte },
set to(v) { condition.dateLre = v },
}; |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have the below code:
As you can see I'm forced to use
$effect.pre()because I cannot use:nor
condition = $derived(() => { condition.kind = kind; // and others... });Since
$effectis "denigrated" in docs I would like to avoid it.Am I right?
Beta Was this translation helpful? Give feedback.
All reactions