Data-binding to non-Observable data object (e.g. Parse objects)


I’ve been trying to figure out how to get data-binding hooked up to Parse objects, but can’t find a way to do it. Have tried things like

var age = Observable(function() { theParseObject.get("age"); } );
age.addSubscriber( function() { theParseObject.set("age", age.value); }

but there are clearly some gotchas here.

One is that I’d need to nudge the observable to update when I’ve run fetch on theParseObject, and I can’t figure out how to do that.

Another is that addSubscriber seems to call the subscriber when you add it, thus running set on theParseObject with uninitialized data. in my case this overwrote valid data already in theParseObject.

I wonder if there’s some clean way to do this on the way and if I should just wait for that…

(thinking about how to handle arrays is giving me headaches)

Not sure if you’ve already looked at it, but this example contains Parse integration, arrays and all:

I haven’t looked at Jake’s video yet, be he also has a fairly lengthy explanation here:

Shout out if you still have problems after looking at these resources and I’m sure we can help you get it to work.