diff --git a/lib/core.js b/lib/core.js index 5440c0a..2765ed2 100644 --- a/lib/core.js +++ b/lib/core.js @@ -1,6 +1,6 @@ +var React = require('react'); var ReactDOM = require('react-dom'); - module.exports = { createClass: function(chartType, methodNames, dataKey) { var classData = { @@ -79,7 +79,6 @@ module.exports = { extra(methodNames[i]); } - var React = require('react'); return React.createClass(classData); } }; @@ -124,4 +123,3 @@ var addData = function(nextProps, chart, setIndex, pointIndex) { }); chart.addData(values, nextProps.data.labels[setIndex]); }; - diff --git a/package.json b/package.json index 46273a1..ac3f75c 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "homepage": "https://github.com/jhudson8/react-chartjs", "peerDependencies": { "react": "*", + "react-dom": "*", "chart.js": "*" }, "devDependencies": {