How can I read a signal unreactively from a createRenderEffect
?
#647
-
So basically I have a signal (A) and through reactivity this happens: A -> B (memo) -> C (render effect). Now in C I want to know the value of A without passing it through B (I have no idea what I'm doing) but if I use A in C, C will run twice when A updates - once through B and once just standalone. I do need the value of A in C tho. So now I made a variable and added another render effect to A that sets the variable which I then read in C. But there has to be a better way? Can't you add like |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
untrack(A) should do the trick: https://www.solidjs.com/docs/latest/api#untrack |
Beta Was this translation helpful? Give feedback.
-
@atk yo how can I write to a signal unreactively, is that possible? |
Beta Was this translation helpful? Give feedback.
untrack(A) should do the trick: https://www.solidjs.com/docs/latest/api#untrack