reactjs / react-chartjs

common react charting components using chart.js
MIT License
2.93k stars 299 forks source link

React 0.14 compatiblity #47

Closed dmr closed 8 years ago

dmr commented 9 years ago

Hi everyone, two things I had to change to make react-chart compatible with the latest reactjs 0.14 beta:

  1. I removed the getDOMNode() from this.refs.canvass.getDOMNode() core.js line 66.
  2. var el = this.getDOMNode();--> var ReactDOM = require('react-dom'); ReactDOM.findDOMNode(this);

react-chartjs is working fine in reactjs 0.14 beta after that :) Just wanted to let you know in case anyone is interested.

asci commented 9 years ago

any pull request, fork?

dmr commented 9 years ago

Sure, https://github.com/jhudson8/react-chartjs/pull/48.

sspross commented 8 years ago

+1

mgibeau commented 8 years ago

I'm also interested in having this merged, but I believe to be safe the peerDependencies should be updated to:

"peerDependencies": {
    "react": "^0.14.0",
    "react-dom": "^0.14.0",
    "chart.js": "*"
}
dmr commented 8 years ago

@mgibeau Yes, I also think peerDependencies is the way to go here! --> #48

gustavoschmidt commented 8 years ago

+1

naugtur commented 8 years ago

@dmr peerDependencies are deprecated and will not work anymore in npm v3, which will be coming to node v4 during the LTS period and is already the stable version - you get it when you npm install npm

mgibeau commented 8 years ago

@naugtur They are not being deprecated, they are simply no longer being installed automatically. They still work in npm 3, as long as you install them manually, which is completely fine and makes sense in the context of plugins such as chartjs.

naugtur commented 8 years ago

If you're aware of this, it's cool.

btw. is this project alive? I'm wondering if I should switch to rc-chartjs, which is more up-to-date

joshhornby commented 8 years ago

https://github.com/jhudson8/react-chartjs/pull/59