Iteration
html`
<todo-list>
${names.map((name) => `Name: ${name}`)}
${items.map(({ name }) => html`<todo-item>${name}</todo-item>`)}
</todo-list>
`;Keys
html`
<todo-list>
${items.map(({ id, name }) =>
html`<todo-item>${name}</todo-item>`.key(id),
)}
</todo-list>
`Last updated
Was this helpful?