Convert JSX element to JointJS markup.
JSX element.
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>); Copy
function CustomComponent(props: Readonly<PropsWithChildren>) { return <div>{props.children}</div>;}const markup = jsxToMarkup( <CustomComponent> <span>Hello</span> </CustomComponent>);
Convert JSX element to JointJS markup.