Skip to content

remix/component · Type

View Source

MixinType

Summary

Setup function called once per mixin slot with its handle and host tag name.

The returned render function receives the factory arguments followed by current host props. Return handle.element to preserve props, JSX using handle.element to patch them, or mixin descriptors to compose more behavior. Returning nothing from setup preserves the host props.

Signature

type MixinType<node, args, props> = (
  handle: MixinHandle<node, props>,
  type: string,
) => ((args: [...args, currentProps: props]) => MixinReturn<node, props>) | void