We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
<ul>
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.
state.todo[1] = 'Text'
How to solve: Use key for each item, improve the diff for arrays
The text was updated successfully, but these errors were encountered:
Still need to handle the array's keys
Sorry, something went wrong.
tuhuynh27
lamngo255
Successfully merging a pull request may close this issue.
Array rendering re-paint if append elements to head
Render function:
Unshift on array state will cause repaint entire the
<ul>
div: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
The text was updated successfully, but these errors were encountered: