Comments (4)
We already batch updates on a microtask. The reason you're seeing all the intermediate updates is because you're using $inspect
– if you instead switch to using an effect that logs the changes then you'll see it works as you expect already. Inspect works this way to help you debug each individual change.
from svelte.
We already batch updates on a microtask. The reason you're seeing all the intermediate updates is because you're using
$inspect
– if you instead switch to using an effect that logs the changes then you'll see it works as you expect already. Inspect works this way to help you debug each individual change.
Maybe the type
for these logs should be 'intermediate-update'
instead of 'update'
, to make that visible.
from svelte.
@PatrickG It's not logging a UI update, but rather, it's logging the update to the bit of state itself.
from svelte.
@trueadm Yea, I understood that. But it seems like it might confuse some people.
from svelte.
Related Issues (20)
- Svelte 5: Portal'd content and multiple elements in same conditional HOT 3
- `SvelteDate.now()` as a live updating source HOT 6
- `<svelte:component>` wrong error message on component creation HOT 2
- Children duplication of list items rendered within components after v `5.0.0-next.179`
- Svelte 5: cannot change nested objects if not binded HOT 29
- [Svelte 5] `state_unsafe_mutation` when using class getters that perform side effects HOT 3
- Svelte 5: using inlang Paraglide JS message in <svelte:head> meta description tag causes error in SSR
- Rest parameters in a snippet should be a compile error HOT 2
- svelte 5 : Attribute values containing `{...}` must be enclosed in quote marks, unless the value only contains the expression
- Nested animate acts weirdly HOT 4
- Svelte 5: replaceState("/", {}) error
- parameter properties not working in svelte components when using svelte.config. 'ts' instead of 'js' HOT 2
- Svelte 5 property override wont assign type. HOT 2
- Svelte 5: desync in variable imported into components HOT 5
- Eslint: value.find is not a function HOT 3
- Svelte 5 REPL renders wrong active tab/file when `App.svelte` is not the first tab
- Svelte 5: Parse error in comment in template interpolation HOT 2
- White spaces in code highlights are not always preserved HOT 4
- Nested styles under :global() should also be global HOT 1
- Svelte 5: `$state` setter `this` is not the proxy HOT 1
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.