-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reference error Self is not defined #278
Comments
Have you managed to fix that? |
I'm getting the same, nearly 2 years later. Also not super thrilled that the neo4j db creds appear client-side. |
@matthabermehl first of all, neovis support putting the creds in the server side for a while now, second of all make sure in vue that you put it after dom is initialized, you can give me minimum viable repo that reproduce the problem and I see how to fix though Im pretty sure it's a vuejs bug |
Same here, always have this error when |
Here's my code that works, note that the filename should be import { useEffect, forwardRef } from 'react';
import NeoVis from 'neovis.js';
interface Props {
config: any
}
export const Neo4jVis = forwardRef<HTMLDivElement, React.HTMLProps<HTMLDivElement> & Props>((props, ref) => {
const { config, ...divProps } = props;
useEffect(() => {
console.log('render NeoVis', config);
const vis = new NeoVis(config);
vis.render();
}, [config]);
return (
<div>
<h2>NeoVis</h2>
<div id={config.containerId} ref={ref} {...divProps}></div>
</div>
);
});
Neo4jVis.displayName = 'Neo4jVis'; |
@reorx Why are you using |
@thebestnom I used NeoVisConfig type initially, but I removed it to prevent importing neovis.js in other modules while debugging the |
I am trying to display noe4j graph inside a component in vue js. But when I am trying to import Neovis from "neovis.js" it is showing self is not defined error.
The text was updated successfully, but these errors were encountered: