Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (22 sloc) 937 Bytes


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.

    ${ => `Name: ${name}`)}

    ${{ name }) => html`<todo-item>${name}</todo-item>`)}

👆 Click and play with todo list on ⚡StackBlitz


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.

    ${{ id, name }) => 
You can’t perform that action at this time.