How to make createEffect to mutate two signals by condition?

I have two tabs component. Left tabs, Right Tabs. If user clicks left tabs's item, selected right tabs's item should be de-selected. vice-versa. I made this code. but it doesn't work.
3 Replies
REEEEE
REEEEE2y ago
What doesn't work? The mutation isn't working or the ui isn't updating?
thetarnav
thetarnav2y ago
I'm not seeing a reason for why this wouldn't work. But imo it's better to not use effects for synchronising state. If you have a setTabIndex function, put that logic there.
REEEEE
REEEEE2y ago
^
Want results from more Discord servers?
Add your server