Remix
Remix
remix/ui · FunctionView Source

ref

Summary

Calls a callback when an element is inserted and aborts it when removed.

Signature

const ref: <boundNode extends Element>(
  args: [callback: (args: [node: boundNode, signal: AbortSignal]) => void],
) => MixinDescriptor<
  boundNode,
  [callback: (args: [node: boundNode, signal: AbortSignal]) => void],
  ElementProps
>;