Comments (3)
For reference, this is my old attempt: aurelia/binding#647
It no longer works due to Lexer and Scanner being removed. But the main point to keep in mind is @jdanyow comment
I'm worried about adding something like this without being able to support common scenarios. I'm afraid it will cause a lot of confusion when simple things like foo.bind="{ ...myArray }" doesn't update when the array mutates or when foo.bind="[ ...myObj ] doesn't update when a property is added.
Today we have a almost entirely clean distinction between property observation and collection mutation observation. Adding something like this is either going to fall short of expectations or force us to mix property observation and collection observation with a healthy dose of dirty-checking to cover all the scenarios.
from aurelia.
Yeah those are good points. I would run into them and systematically try to cover all the scenarios through a few iterations.
My view on this is pretty straightforward I think: spread operator means that the whole object or array is expanded and each individual property (or element) assigned to the target context. Therefore each individual property or element is also observed.
For an object that means having a property observer on each property, for an array that means a collection observer for the elements (optionally a proxy as well) + instance observer for the object itself.
Now that we have proxies, properties being added is something we can account for without too much hassle. So we wouldn't need dirty checking.
The implementation might be large enough however to make it a better fit for a separate plugin.
from aurelia.
I'm closing this because even if it were to be implemented, this would happen at a very late stage. Better to keep the issue list a bit more tidy and reopen later if there is a need.
from aurelia.
Related Issues (20)
- Portal attribute: aurelia markup <!--au-start--><!--au-end--> are not removed
- Calling store.dispatch in sequence will only set the new state once
- Incorrect injection of parent custom element HOT 6
- New instance injected when using CustomElementDefinition#dependencies HOT 1
- OPEN COLLECTIVE FUNDS HOT 2
- [feature request] state plugin should be able to connect to redux devtools HOT 1
- 🏁 Roadmap & Iteration plan Q1 2024 HOT 3
- flickering caused by aurelia rendering content before clearing the old HOT 2
- [RFC] Custom element bindables take priority over custom attribute
- [refactor] remove define life cycle HOT 1
- Vite plugin for aurelia 1.x? HOT 4
- Router load attribute: broken when using id & parameters.bind HOT 7
- Injecting IHttpClient error after beta 11 update
- Router swallows DI errors HOT 7
- Restrict behavior of custom attribute single value binding and primary bindable HOT 8
- Tweak aurelia package reexports HOT 9
- Validation Package - Email validation HOT 7
- Replacing view factory containers
- Vite load issue. HOT 2
- Define `ts-jest` config under `globals` is deprecated HOT 2
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 aurelia.