AnSavvides / d3act

d3 with React
MIT License
298 stars 26 forks source link

Not compatible with React v15 #22

Closed microdou closed 8 years ago

microdou commented 8 years ago

It worked great with React v0.14.x, but now fails to display charts in React v15. Console error message: Uncaught Invariant Violation: traverseParentPath(...): Cannot traverse from and to the same ID,``.

AnSavvides commented 8 years ago

Thanks for flagging this! I am hoping to find some free time this week and have a look at this, but in the meanwhile if you have any free time & are interested to have a poke around and figure out what's going wrong, pull requests are very welcome! :)

microdou commented 8 years ago

@AnSavvides

Thanks! Unfortunately I'm still not very experienced in advanced use of React. Thanks to Redux, which saved me a lot of work from dealing with 'this', 'props' or 'componentWillMount' etc :) But I will give it a try to see what's going on in d3act after the upgrade.

Having tried a bunch of packages in the past year to make react and d3 work together, I think d3act is the best implementation so far which is able to make use of d3 codes without much modification or sacrificing performance. It works perfectly for my current project with React 0.14.x. But still its better to move forward to React 15 to avoid dependency hell.

Thanks again!

AnSavvides commented 8 years ago

Thanks for your kind words @microdou!

So, I had a quick look, updated d3act locally to v15.0.1 and used it in a little test project and it all seems to be working smoothly. I'll do a quick release with v15.0.1 and give that a go - if the issue still persists, my guess is there is something else at play - in which case, if you could put together a small app where you can showcase this error that would be great so I can try figure this out!

AnSavvides commented 8 years ago

Try npm install d3act@2.0.0 --save and let me know how it goes :)

microdou commented 8 years ago

Problem solved! Now all d3act charts including custom d3 charts are working great with React v15.0.1! Thank you @AnSavvides!

microdou commented 8 years ago

Did not realize that a dependency version bump was able to solve the problem :) That's the beauty of the d3act as a compact package.

I have to mention that the d3 force-direct graph works exceptionally good via d3act, where many other d3~react implementations miss.

AnSavvides commented 8 years ago

Brilliant, I am glad to hear it's all sorted! 🎉