First pass we want to update the default properties of all views. Second pass we merge updated default properties with additional properties set by user. Here's an example. Let's assume we have a label with id "cellLabel" with these default properties {backgroundColor: 'red'} set on Template. Then the developer call section.setItems( [ {cellLabel: {text: "hi"} } , {cellLabel: {color: 'blue'}} ] );
After first pass, the default properties should look like this: {backgroundColor: 'red', text: null, color: null}
After second pass, we would store these two: {cellLabel: {backgroundColor: 'red', text: 'hi', color: null} } and {cellLabel: {backgroundColor: 'red', text: null, color: 'blue'} }. This needs to be done for recycling of views to work.