Open
Description
Array rendering re-paint if append elements to head
Render function:
<ul>
<li each="todo in state.todos">{{ todo }}</li>
</ul>
Unshift on array state will cause repaint entire the <ul>
div:
function addTodo() {
state.todos.unshift(state.text)
state.text = ''
}
The same will happen for state.todo[1] = 'Text'
and any other operations on array state.
How to solve: Use key for each item, improve the diff for arrays