It looks similar to using a component but there is a big difference in the way the HTML snippet is created. Once the template Row()
function is called the statics of the HTML snippet are cloned in 1 DOM operation while a regular component with html``
tag would create every node with properties and content one by one which makes a costly difference in performance.
o
is an observable tag. It adds a proxy on the passed object property and repeats the recorded tag action when set.t
is a normal tag.The Row
in this case would accept an object like in the below example.
Row({ id: 1, label: 'Banana', selected: 'peel' });
Try it on Codesandbox