Closed lominming closed 1 year ago
In JSX, we can use ref like <div ref={var}...>, is there a equivalent for tagged template so that I can get a reference to the dom element?
ref
<div ref={var}...>
You can use ref but inly in the callback form.
Like:
let ref; html`<div ref=${el => ref = el} />`
Or just pass a signal setter to it.
In JSX, we can use
ref
like<div ref={var}...>
, is there a equivalent for tagged template so that I can get a reference to the dom element?