I am trying to migrate from v5 to v6 in a ES6 project, but I am having issues.
I've used the example code from https://projectstorm.gitbook.io/react-diagrams/getting-started/using-the-library.
Not sure what I am doing wrong, this should work for ES6 too, right?
index.js:24 Uncaught TypeError: Cannot read property 'getLayers' of null
at Component.render (index.js:24)
at finishClassComponent (react-dom.development.js:18450)
at updateClassComponent (react-dom.development.js:18403)
at beginWork$1 (react-dom.development.js:20160)
at HTMLUnknownElement.callCallback (react-dom.development.js:337)
at Object.invokeGuardedCallbackDev (react-dom.development.js:386)
at invokeGuardedCallback (react-dom.development.js:441)
at beginWork$$1 (react-dom.development.js:25737)
at performUnitOfWork (react-dom.development.js:24661)
at workLoopSync (react-dom.development.js:24637)
What is the value of the "engine" prop? Can you share the code please?
Oh man, I've found the issue after checking the engine prop (where model was null), the function where this.engine.setModel(this.model);
happens was never called!
Thanks for your hint, Pierre!
Most helpful comment
What is the value of the "engine" prop? Can you share the code please?