Item knows about a remove operation, which means it "knows" that it exists in some kind of container (List or otherwise).
Not saying I know of a better solution or that I wouldn’t write it that way myself... just that I’m a little wary of dispatch and I’d keep my eyes open for opportunities to design it differently.
Another point: unless I’m mistaken, $on is part of the internal Svelte API so if you use it, you have to be prepared to figure out a new solution if/when the maintainers break this one 🤣
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Item
knows about aremove
operation, which means it "knows" that it exists in some kind of container (List
or otherwise).Not saying I know of a better solution or that I wouldn’t write it that way myself... just that I’m a little wary of
dispatch
and I’d keep my eyes open for opportunities to design it differently.Another point: unless I’m mistaken,
$on
is part of the internal Svelte API so if you use it, you have to be prepared to figure out a new solution if/when the maintainers break this one 🤣