# Frameworks EasyDrawer is framework-agnostic: create the editor when the element is mounted and remove it when it is unmounted. It needs the DOM, so with server-side rendering (Next.js, Nuxt…) create it on the client only. ## React ```tsx import { useEffect, useRef, useState } from 'react'; import { Editor } from 'easydrawer'; import 'easydrawer/styles.css'; export function Drawing() { const container = useRef(null); const [editor, setEditor] = useState(null); useEffect(() => { const instance = new Editor(container.current!, { tools: { pen: { color: '#1f2937', thickness: 3 } }, }); setEditor(instance); return () => instance.remove(); }, []); return ( <>
); } ``` With Next.js, load the component with `dynamic(() => import('./Drawing'), { ssr: false })`. ## Vue ```vue ``` Use `shallowRef`, not `ref`: the editor is a large object that shouldn't be made reactive. With Nuxt, wrap the component in ``.