score:1

Accepted answer
import SvgEditor from './svg-editor.js'
   componentDidMount() {
    (async () => {
      try {
        // We wait a micro-task to let the svgEditor variable be defined for module checks
        await Promise.resolve()
        SvgEditor.init()
      } catch (err) {
        console.error(err) // eslint-disable-line no-console
      }
    })()
  }

Related Query

More Query from same tag