Closed bitinn closed 11 years ago
Hi bitiin. Thanks for your question. Would you be so kind to make an example, for example using something like jsfiddle.net? I can take a look at it then. Also, i would be interested in seeing how rivets and stapes work together!
rivets does have a (well-hidden) Todo example with older stapes: http://bl.ocks.org/mikeric/3345763, it use an adapter to listen for change event emitted by stapes.
I mainly use knockout.js in the past, and their obserable array implementation is what I normally use for case described above, their doc might serve better explanation - http://knockoutjs.com/documentation/observableArrays.html
also see discussion regarding this on rivets end: https://github.com/mikeric/rivets/issues/52, I do think stapes + rivets will be great, so please keep up the good work!
I recently started to use stapes.js with rivets.js (data-binding) on a small project, one of the common tasks is to append an array of objects (from json response) to an existing array of objects (say for infinite scroll).
In order for rivets to update data-binding automatically and keep objects in order (so we can iteration it using input order), I copy the existing array and concat it with new array.
Is there a better way using push (that guarantee orders)? any performance impact when setting large array?