import { useEffect, useRef } from 'preact/hooks' import ReactMdxEditor from ':components/react/MdxEditor.tsx' import React from 'react' import ReactDOM from 'react-dom/client' export default function MdxEditor(props: Parameters[0]) { const ref = useRef(null) useEffect(() => { if (ref.current) { const root = ReactDOM.createRoot(ref.current!) root.render(React.createElement(ReactMdxEditor, props)) } }, []) return
}