delay execution of createEffect.
I have a use case where I want one of my createEffect to be called before another . Currently they are called one after the other. I want to swap the executing sequence.
13 Replies
Is it possible to do that. Or I am trying something weird over here. I have a very valid use case though.
Would help to see some code?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
no way to handle it without timer ?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
So you want the condition2 effect to run first?
Yes correct
condition1
to run first.Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
both the condition can be true at the same time. I have not added the complete snippet here. Basically I want to keep them in separate effects to avoid unnecessary computation. But thanks I will look for a settimeout as a solution for now.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
😢 I don't want to use it . will find a better way eventually . Thanks for your help
The only other way is to have a third temporary signal that you update after the first condition and the effect for the second condition reads it
aah that makes sense