@joint/react
    Preparing search index...

    Function jsx

    • Convert JSX element to JointJS markup.

      Parameters

      • element: Element

        JSX element.

      Returns MarkupJSON

      JointJS markup.

      This generate just static markup from JSX, it doesn't support dynamic components and hooks.

      function CustomComponent(props: Readonly<PropsWithChildren>) {
      return <div>{props.children}</div>;
      }
      const markup = jsxToMarkup(
      <CustomComponent>
      <span>Hello</span>
      </CustomComponent>
      );