Comments (9)
Hi, I'm the maintainer of svelte-dnd-action. Based on
Confirmed this is due to delaying rerenders. The action updates its state in an update callback which is coming in too late for the other events, meaning that 5 items instead of 4 are inside the array, and that somehow messes with the each block.
This sounds like an issue with svelte that can affect other existing actions.
from svelte.
Mmm I think is rerunning the snapshot over and over since is in the template effect.
However if it's not necessary better since it's one distraction less. I'll try to take a look later
from svelte.
Confirmed this is due to delaying rerenders. The action updates its state in an update
callback which is coming in too late for the other events, meaning that 5 items instead of 4 are inside the array, and that somehow messes with the each block.
from svelte.
$state.snapshot
removes reactivity so you can't expect to use snapshot and still have reactivity
from svelte.
$state.snapshot
removes reactivity so you can't expect to use snapshot and still have reactivity
@paoloricciuti Is it? I'm pretty sure that the HTML/Svelte code still "reference" the reactive state variable, because it still works when I downgrade to Svelte version @5.0.0-next.139 (repl: https://www.sveltelab.dev/ql0iefy6cbg81tq - the same as the repl above, only change is downgrade svelte to @5.0.0-next.139)
from svelte.
Okay so it turns out the $state.snapshot
wasn't necessary, it was me trying to fix the error, I have updated the description and repl
from svelte.
Uh 140 Is the yield effects one. I have the feeling this is either something to fix in DnD itself or something really non obvious.
from svelte.
So is this a bug that Svelte need to fix or something that svelte-dnd-actions needs to fix?
from svelte.
Fixed by #11855, we reverted the event defer changes
from svelte.
Related Issues (20)
- Svelte 5: Mutation warning when assigning non enumerable properties HOT 7
- onwheel not fired
- Svelte 5 Docs: Provide some information on potential pitfalls of runtime reactivity HOT 1
- Svelte 5: deferred events + intermediate UI changes HOT 3
- Reading and modifying store in $effect does not produce effect_update_depth_exceeded error HOT 3
- Svelte 5: $derived inside component does not get cleaned up causing memory leak HOT 2
- Svelte 5: false warn (non_reactive_update) var is updated, but is not declared with `$state(...)` HOT 33
- Allow the user to ignore warnings in the script tag HOT 10
- Svelte 5: #each randomly don't respect the array order after some mutations HOT 10
- $state.is always returns false during ssr
- Svelte 5: Abrupt Flickering Behavior in >next-140 HOT 12
- Transitions not working at all HOT 3
- Hoist
- export `transition:fn` types
- Svelte 5: Allow classes to opt-in to deep reactivity HOT 4
- Svelte 5: SVG elements within <slot> fallback not displayed
- Svelte 5: Unnecessary `ownership_invalid_mutation` warning HOT 1
- Performance of accessing deeply reactive state HOT 10
- Svelte 5: Why is this object a Proxy only when the `page` field is 1? HOT 10
- pre-process script 'process-messages' not working when .DS_Store is in `messages/` directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte.