Closed xgh127 closed 2 months ago
Im pretty sure useEffect runs before the dom is ready, I don't remember what is the correct effect but you have to run the render after the DOM is rendered
I think you need to out if(visRef) because you set it to initialize to undefined by default and put in the effect
https://stackoverflow.com/questions/58579426/in-useeffect-whats-the-difference-between-providing-no-dependency-array-and-an Maybe Im wrong? Im pretty sure that's the problem though try to console log it
Though your error doesn't make any sense, doing anything after new will never be null/undefined
(Also the nonFlat should be part of the config, not on the instance itself, it does nothing there)
(and it should be new NeoVis(config)
without config.value)
Ahh, the error is cause you send undefined as config
Ahh, the error is cause you send undefined as config
I don't understand this reply. If I use new NeoVis(config) without config.value,it reports another error
What is the another error?
My code is as below:
but it always enter catch(e),report error:NeoGraph.js:129 Cannot read properties of undefined (reading 'nonFlat') I have no idea on how to solve this error.