react-winjs.js
function PropHandlers_syncChildrenWithBindingList(bindingListName) {
        return {
            preCtorInit: function syncChildrenWithBindingList_preCtorInit(element, options, data, displayName, propName, value) {
                var latest = processChildren(displayName, value, {});
                data[propName] = {
                    winjsChildComponents: latest.childComponents,
                    winjsChildComponentsMap: latest.childComponentsMap
                };

                options[bindingListName] = new WinJS.Binding.List(
                    latest.childComponents.map(function (winjsChildComponent) {
                        return winjsChildComponent.winControl;
                    })
                );
            },
            update: function syncChildrenWithBindingList_update(winjsComponent, propName, oldValue, newValue) {
                var data = winjsComponent.data[propName] || {};
                var oldChildComponents = data.winjsChildComponents || [];
                var oldChildComponentsMap = data.winjsChildComponentsMap || {};
                var latest = processChildren(winjsComponent.displayName, newValue, oldChildComponentsMap);

                var bindingList = winjsComponent.winControl[bindingListName];
                if (bindingList) {
                    applyEditsToBindingList(
                        bindingList,
                        diffArraysByKey(oldChildComponents, latest.childComponents)
                    );
                } else {
                    winjsComponent.winControl[bindingListName] = new WinJS.Binding.List(latest.childComponents.map(function (winjsChildComponent) {
                        return winjsChildComponent.winControl;
                    }));
                }

                winjsComponent.data[propName] = {
                    winjsChildComponents: latest.childComponents,
                    winjsChildComponentsMap: latest.childComponentsMap
                };
            },
            dispose: function syncChildrenWithBindingList_dispose(winjsComponent, propName) {
                var data = winjsComponent.data[propName] || {};
                var childComponents = data.winjsChildComponents || [];
                childComponents.forEach(function (winjsChildComponent) {
                    winjsChildComponent.dispose();
                });
            }
        }
    }
function PropHandlers_syncChildrenWithBindingList(bindingListName) {
        return {
            preCtorInit: function syncChildrenWithBindingList_preCtorInit(element, options, data, displayName, propName, value) {
                var latest = processChildren(displayName, value, {});
                data[propName] = {
                    winjsChildComponents: latest.childComponents,
                    winjsChildComponentsMap: latest.childComponentsMap
                };

                options[bindingListName] = new WinJS.Binding.List(
                    latest.childComponents.map(function (winjsChildComponent) {
                        return winjsChildComponent.winControl;
                    })
                );
            },
            update: function syncChildrenWithBindingList_update(winjsComponent, propName, oldValue, newValue) {
                var data = winjsComponent.data[propName] || {};
                var oldChildComponents = data.winjsChildComponents || [];
                var oldChildComponentsMap = data.winjsChildComponentsMap || {};
                var latest = processChildren(winjsComponent.displayName, newValue, oldChildComponentsMap);

                var bindingList = winjsComponent.winControl[bindingListName];
                if (bindingList) {
                    applyEditsToBindingList(
                        bindingList,
                        diffArraysByKey(oldChildComponents, latest.childComponents)
                    );
                } else {
                    winjsComponent.winControl[bindingListName] = new WinJS.Binding.List(latest.childComponents.map(function (winjsChildComponent) {
                        return winjsChildComponent.winControl;
                    }));
                }

                winjsComponent.data[propName] = {
                    winjsChildComponents: latest.childComponents,
                    winjsChildComponentsMap: latest.childComponentsMap
                };
            },
            dispose: function syncChildrenWithBindingList_dispose(winjsComponent, propName) {
                var data = winjsComponent.data[propName] || {};
                var childComponents = data.winjsChildComponents || [];
                childComponents.forEach(function (winjsChildComponent) {
                    winjsChildComponent.dispose();
                });
            }
        }
    }
function PropHandlers_syncChildrenWithBindingList ( bindingListName ) { return { preCtorInit : function syncChildrenWithBindingList_preCtorInit ( element , options , data , displayName , propName , value ) { var latest = processChildren ( displayName , value , { } ) ; data [ propName ] = { winjsChildComponents : latest . childComponents , winjsChildComponentsMap : latest . childComponentsMap } ; options [ bindingListName ] = new WinJS . Binding . List ( latest . childComponents . map ( function ( winjsChildComponent ) { return winjsChildComponent . winControl ; } ) ) ; } , update : function syncChildrenWithBindingList_update ( winjsComponent , propName , oldValue , newValue ) { var data = winjsComponent . data [ propName ] || { } ; var oldChildComponents = data . winjsChildComponents || [ ] ; var oldChildComponentsMap = data . winjsChildComponentsMap || { } ; var latest = processChildren ( winjsComponent . displayName , newValue , oldChildComponentsMap ) ; var bindingList = winjsComponent . winControl [ bindingListName ] ; if ( bindingList ) { applyEditsToBindingList ( bindingList , diffArraysByKey ( oldChildComponents , latest . childComponents ) ) ; } else { winjsComponent . winControl [ bindingListName ] = new WinJS . Binding . List ( latest . childComponents . map ( function ( winjsChildComponent ) { return winjsChildComponent . winControl ; } ) ) ; } winjsComponent . data [ propName ] = { winjsChildComponents : latest . childComponents , winjsChildComponentsMap : latest . childComponentsMap } ; } , dispose : function syncChildrenWithBindingList_dispose ( winjsComponent , propName ) { var data = winjsComponent . data [ propName ] || { } ; var childComponents = data . winjsChildComponents || [ ] ; childComponents . forEach ( function ( winjsChildComponent ) { winjsChildComponent . dispose ( ) ; } ) ; } } }
Uses the Binding.List's editing APIs to make it match the children prop. Does this to the Binding.List stored in the winControl's property called bindingListName.
Uses the Binding . List s editing APIs to make it match the children prop . Does this to the Binding . List stored in the winControl s property called bindingListName .