You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, new to Surplus and enjoying it so far. I recently ran into this issue and have been left scratching my head. I've created a fiddle here: https://jsfiddle.net/awei01/hfLq5knr/
The basic scenario is that I have a module that updates some S values when instantiated (like a loading indicator). Correct me if I'm wrong, but I'm assuming that the issue is that the component wraps everything in an S.freeze or something, so that values that change throw the warning about values changing.
I'm wondering how to unfreeze the instantiation so that the component can observe the loading state. Hopefully my demo will be clearer than this crappy explanation.
The text was updated successfully, but these errors were encountered:
Woah! This is actually a bug in S.value(). If you change isLoading() to an S.data() it will work. It will also work if you add a trivial computation that reads isLoading() before you call doSomething(), because the bug is in an optimization for the case where a signal changes that isn't being read by anyone. Simplest repro is:
constv=S.value(1)v(2)// okv(3)// error
I'll get a fix out for this soon. Thanks for the report, especially for including an example!
Hi, new to Surplus and enjoying it so far. I recently ran into this issue and have been left scratching my head. I've created a fiddle here: https://jsfiddle.net/awei01/hfLq5knr/
The basic scenario is that I have a module that updates some
S
values when instantiated (like a loading indicator). Correct me if I'm wrong, but I'm assuming that the issue is that the component wraps everything in anS.freeze
or something, so that values that change throw the warning about values changing.I'm wondering how to
unfreeze
the instantiation so that the component can observe the loading state. Hopefully my demo will be clearer than this crappy explanation.The text was updated successfully, but these errors were encountered: