Open yuvrajchaudhari03 opened 1 year ago
So far I've made no effort to support React/Next.js. I'd be surprised if it works out of the box. You need to be careful to not execute Kleck's initialization logic twice. Also Klecks has no destructor yet.
At some point I will look into this.
I'm trying to embed Kleki into the next Js project but getting this error
Uncaught Error: Already created an embed
code: ` if (typeof window !== "undefined" && typeof window.Klecks !== "undefined") { const klecks = new Klecks({ onSubmit: (onSuccess, onError) => { console.log(klecks.getPNG()) klecks.getPSD().then((blob) => { console.log(blob) });
`