-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Svelte 5: Put unstate
on $state
rune?
#10421
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
Comments
putting this on the milestone in the sense of "we need to decide whether or not we want to do this until 5.0" |
Domain hack-ish idea: |
We decided to keep |
@dummdidumm |
Oops sorry - reopening . We haven't decided that one yet, though it may go in the same direction |
I don't think we need a new rune for this right now. We can always leave it for now make it one later, but doing the reverse it going to be much harder. |
I think the main thing that would appeal to me about making this a rune would be the possibility of doing this without wrapping the expression in a function. E.g., we could have |
@Conduitry This is for |
Oh, apologies. I can't read. Never mind! |
Considering how unstate has been confused with untrack twice here in the same thread, both by major contributers (which is a great example of the oddness of unstate), I think that at least a rename should be considered. I think remove more clearly represents what unstate does ( I also like I was thinking the word removed might better indicate how the function is non-destructive (like toSpliced), however, that might lead developers to expect a clone when they might not get one, i.e. if a non-reactive object is passed. |
We decided that the confusion over the naming of this function warranted it being a new rune after all. |
I agree with the comment on the PR that |
Describe the problem
Since
unstate
is linked to$state
, it might make sense to make it a function on$state
.unstate
is also a bit of an odd/non-word.Describe the proposed solution
Not sure about the name, maybe one of
$state.remove
/$state.removed
$state.clear
/$state.cleared
$state.off
Importance
nice to have
The text was updated successfully, but these errors were encountered: