diff.tsx 331 B

12345678910
  1. import type { ValidComponent } from "solid-js"
  2. import { createSimpleContext } from "./helper"
  3. const ctx = createSimpleContext<ValidComponent, { component: ValidComponent }>({
  4. name: "DiffComponent",
  5. init: (props) => props.component,
  6. })
  7. export const DiffComponentProvider = ctx.provider
  8. export const useDiffComponent = ctx.use