Comments (2)
Not currently. It's definitely on the TODO list. There are basically two (possibly overlapping) approaches that are possible:
- Use some syntax to declare the key, like
{{#each:id ...}}
or{{#eachkeyed foo, i, key}}
or whatever. - Create an API for manipulating lists programmatically
The advantage of 1 is that it's an easy way to get that functionality even in deeply nested each blocks. The advantage of 2 is that you can be very precise about which parts of the component need to be checked for changes (i.e. you can insert an item into a list and not touch anything else at all, whereas with keyed updates you need to account for changes in items whose keys are the same), and there's no requirement for any sort of diffing.
Open to API/design suggestions!
from svelte.
Closing in favour of #81
from svelte.
Related Issues (20)
- `spring` performs differently on displays with different refresh rates HOT 3
- `bind:this` on `svelte:component` that becomes falsy is not updated HOT 2
- Can't find external library HOT 1
- Navigating throws error: `parts is not iterable` HOT 2
- Auto propagate classes HOT 5
- Svelte compiler parse/walk type errors
- Sveltekit with Svelte5 renders apps twice on viewport when behind a cname HOT 2
- Svelte 5: Assigning `element.children` or `element.childNodes` to a state removes its proxy and reactivity HOT 2
- Svelte 5: `<title>` breaks if object becomes undefined
- Svelte 5: class `$derived` fields should be getters HOT 1
- docs: Reorder svelte 5 rune docs HOT 3
- Can't find a way to remove the `svelte-${hash}` css scope HOT 1
- feat(docs): Stateful vs Side-Effectual Runes HOT 1
- Svelte 5: TypeScript types for snippets are not removed HOT 5
- Explicit bindings with `$props.bindable()` HOT 29
- Svelte 5: derived store not reactively updated HOT 2
- Svelte 5: `bind`ing an object to a prop has no effect HOT 1
- Incorrect derived type of store with optional content HOT 1
- Svelte 5: effects run out of order HOT 9
- Svelte 5: TypeError: children.forEach is not a function HOT 3
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.