UNPKG

@beqa/unplugin-transform-react-slots

Version:

JSX to slot function transpilation plugin for some of the common build systems

17 lines (13 loc) 272 B
// Checks that transformation is not done when useSlot is not imported import * as React from "react"; function useSlot() { return { slot: { default: function () { return <div />; }, }, }; } const { slot } = useSlot(); <slot.default />;