Binding to Objects -- Polycasts #30
Why Stack Overflow recommends it
Stack Overflow users link it when answering Polymer 1.0 questions where nested object or array values do not update, since it shows why you need this.set() or notifyPath().
Recommended by 3 people across 3 different months, 2015 to 2015.
What it is
A short Polycasts episode from the Chrome Developers team that explains what Polymer 1.0 does behind the scenes when you bind to an object's sub-property. It walks through path change notifications and why changing a nested value directly does not update the UI, with a demo employee-record element.
What people said
Recommends Ankit Popli · 2015-10 · Stack Overflow · on “Polymer: firebase DB not updating using firebase-element”
As per my initial assumption (which was completely wrong) , I thought the behavior had something to do with firebase-document [LINK] element, infact the behavior is well defined inside the Polymer's Data Binding [LINK] system. Solution 1: Replace the whole property. this.stats = {count: 2}; Solution 2: Let the system know a Path Binding [LINK] has been updated. this.stats.count = 2; this.notifyPath('stats.count', this.stats.count); Solution 3: Let the Polymer handle the path binding stuff for you. this.set('stats.count', 2); Straight from the docs [LINK] : This system “just works” to the extent that changes to object sub-properties occur as a result of being bound to a notifying custom eleme
Recommends Brandon Harmon · 2015-11 · Stack Overflow · on “Polymer 1.0 deep path array binding”
I believe the issue, which @jeanPokou solved was that you need to use the 'this.set(Object, New Value)' to set the value on the nested object. You can check this video from the 'Ask Polymer' series to learn more about why it doesn't update nested values: [this video]
Recommends Let Me Tink About It · 2015-12 · Stack Overflow · on “Polymer 1.0: Forced to reload browser for <firebase-collection> data to automatically populate”
This might be a special use case of the path binding feature described in this video [this video] not working? Maybe somebody can explain why not? Or what might be going on?
Recommends Let Me Tink About It · 2015-12 · Stack Overflow · on “Polymer 1.0: Forced to reload browser for <firebase-collection> data to automatically populate”
This might be a special use case of the path binding feature described in this video [this video] not working? Maybe somebody can explain why not? Or what might be going on?
Recommends Let Me Tink About It · 2015-12 · Stack Overflow · on “Polymer 1.0: Forced to reload browser for <firebase-collection> data to automatically populate”
This might be a special use case of the path binding feature described in this video [this video] not working? Maybe somebody can explain why not? Or what might be going on?
Cites Let Me Tink About It · 2015-12 · Stack Overflow · on “Polymer 1.0: Forced to reload browser for <firebase-collection> data to automatically populate”
@AnkitPopli: Thanks +1. But I'm not sure if that's the issue because according to that answer and the Rob Dodson video [this video] , declarative path bindings should auto update as expected.