hamedpro / freeflow-core

🩵⚡️next generation of decentralised collaboration
3 stars 1 forks source link

sync EditorJs async lifecycle with React #231

Open hamedpro opened 1 year ago

hamedpro commented 1 year ago

some of EditorJs methods work asynchronously but React lifecycle is not async. so for example maybe editor start initialising and before it access its holder div component unmount! it will throw an error saying no such div is present. (it actually happened to me.) also before comp is unmounted, make sure .destroy method has done its work.

hamedpro commented 1 year ago

also everywhere else this is possible to need async lock to make sure about order of async tasks.