Iteration
Last updated
Last updated
For iteration, an expression should return an array
with a list of expressions. Items can be primitive values, nested templates as well as nested arrays.
Click and play with todo list example:
For default, array index
identifies expressions for re-render. However, you can use key
method provided by the result of html
call for efficient re-order (it sets a key and returns update function). When the list changes and a key is found, the existing template is updated rather than a new one is created.