Becoming fully reactive: an explanation of Mobservable
1–3 of 3 posts
Re: Becoming fully reactive: an explanation of Mobservable
#2"Due to limitations of native arrays in ES5 (array.observe is only available in ES7, and arrays cannot be extend),..."
"Bear in mind that Array.isArray(observable([])) will yield false, so whenever you need to pass an observable array to an external library, it is a good idea to create a shallow copy before passing it... "
Also, now that Object.observe has been removed from the standards track[2], does anyone know the fate of Array.observe? MDN says it's not on std track either.[3]
How are we going to write any sort of observable library that includes arrays with zero support from the language? (At least Objects have getters and setters and the ability to seal etc...)
[1] http://mweststrate.github.io/mobservable/refguide/observable... [2] https://esdiscuss.org/topic/an-update-on-object-observe [3] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Re: Becoming fully reactive: an explanation of Mobservable
#3This looks really interesting but there are a few caveats wrt Arrays:[1] "Due to limitations of native arrays in ES5 (array.observe is only available in ES7, and arrays cannot be extend),..." "Bear in mind that Array.isArray(observable([])) will yield false, so whenever you need to pass an observable array to an external library, it is a good idea to create a shallow copy before passing it... " Also, now that Object.…
I wrote a short blog post about the issue: https://medium.com/p/object-observe-is-dead-long-live-mobser.... Mobservable currently relies on property getters / setters, both for arrays and objects. Probably until proxies will be generally available.