esnet / react-timeseries-charts

Declarative and modular timeseries charting components for React
http://software.es.net/react-timeseries-charts
Other
861 stars 284 forks source link

Object(...) is not a function? #388

Closed hp8wvvvgnj6asjm7 closed 5 years ago

hp8wvvvgnj6asjm7 commented 5 years ago

I can't get started because I get this error in the browser:

TypeError: Object(...) is not a function main.js line 97 > eval:14:73
    <anonymous> webpack:///./client/main.jsx?:14
    jsx http://localhost:8081/main.js:97
    __webpack_require__ http://localhost:8081/main.js:20
    <anonymous> webpack:///multi_(webpack)-dev-server/client?:2
    0 http://localhost:8081/main.js:7761
    __webpack_require__ http://localhost:8081/main.js:20
    <anonymous> http://localhost:8081/main.js:84
   <anonymous> http://localhost:8081/main.js:87

Thats my JSX file:

import ReactDOM from 'react-dom'
import {
    Charts,
    ChartContainer,
    ChartRow,
    YAxis,
    LineChart
} from "react-timeseries-charts";

import { timeSeries } from "pondjs";

const series = timeSeries({
    name: "sensor_data",
    columns: ["time", "sensor", "status"],
    points: [
        [1400425947000, 3, "ok"],
        [1400425948000, 8, "high"],
        [1400425949000, 2, "low"],
        [1400425950000, 3, "ok"]
    ]
});

class Alpha extends React.Component {render() {

  return ( <h1>a</h1>)

}}
ReactDOM.render(<Alpha />, document.getElementById('-'))
sartaj10 commented 5 years ago

Just curious, what was the fix for this?