-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove discouragement of untrack
#89
Conversation
See #52 The total point of the API is not to cause subscribers, and to not re-run when the signal change, for performance or any other reason.
this may be my opinion, but |
I understand your concern, but I think that should be on its own issue, as it's a different topic. Maybe a good idea is to start a discussion to identify the problematic uses of signals, like writing to signals in an effect, reading and writing to the same signal in a line such |
@titoBouzout I don't recall seeing someone mention this as an issue before, so can you expand on the problem with this? signal.set(signal.get() + 1); How would you recommend someone increment the value? |
The problem with that snippet is that Solid solves this by providing the |
Hmm. I think you may be making some assumptions based on a particular implementation you are familiar with. This code does not cause an infinite loop when used in a |
Then the implementation is broken. That's not how signals work. |
I mean, that's why we're here, to define how they work in a way that allows for easier and more ergonomic authoring, attempting to solve all the problems encountered by all variants of this type of reactivity over the last good many years <3 We can fix things! 🎉 |
Yeah, and I am trying to help :) I am a heavy user of signals. How comes reading to a signal and writing to it on a tracked place doesn't cause the tracked place to rerun for eternity? What if you want to do just that but cut the loop when the counter reaches 10? I honestly don't see how the implementation could be right if doesn't re-run. I didn't mean to sound rude or discouraging, but if something looks broken to me, I would just say it. |
I'm not an expert on this area of the proposal. I just wanted to point out how it works today. I wasn't involved with the conversations around this part of the spec, but I do know that Ryan has been involved and Milo has been extremely active. @modderme123 Do you want to jump in and clarify the above behavior? |
This thread forms a pretty strong argument to add an |
Personally, I'd like to see some examples <3 |
Is not ergonomics, is about updating a signal value without causing tracking. Anyway, we are getting sidetracked. Can we merge this PR and talk about the issues in an organized way? I opened this issue for the updating a signal value without causing tracking #92 we can open another issue for the issues you are seeing with |
Let's continue discussion in #92 for now. |
See #52
The total point of the API is not to cause subscribers, and to not re-run when the signal change, for performance or any other reason.