cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

TypeError: Object doesn't support this action

Hi,

I am getting the following error while trying to use neovis.js with react. Please help in resolving this.

  1. The above error occurred in the component: in Suggestions1 (created by Context.Consumer) in Route (at App.js:23) in div (at App.js:22) in Router (created by BrowserRouter) in BrowserRouter (at App.js:21) in div (at App.js:20) in App (created by ConnectFunction) in ConnectFunction (at src/index.js:14) in Provider (at src/index.js:14) Consider adding an error boundary to your tree to customize error handling behavior. Visit https://fb.me/react-error-boundaries to learn more about error boundaries.

1.chunk.js (72811,11)
2. 0: Object doesn't support this action

CODE:

import React, { Component } from 'react';
//import './Component.css'
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import NeoVis from 'neovis.js/dist/neovis.js';

class Suggestions1 extends Component {
constructor(props) {
super(props);
this.state = {
viz: undefined,
};
}
componentDidMount() {
const config = {
container_id: "viz",
server_url: "neo4j://localhost:7687",
server_usr: "neo4j",
server_password: "Test123",
labels: {

    },
    relationships: {

    },
    initial_cypher: "MATCH (p:Person)-[:DIRECTED]->(:Movie) RETURN p"
}
this.testData = new NeoVis.default(config);
// this.setState({
//     viz : testData
// })
this.testData.rendor();

}
render() {
return (


{this.state.viz}

);
}
}

export default Suggestions1;

0 REPLIES 0