Skip to content
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

Using algorithms on graph object in React. #15

Open
emilgulayev opened this issue Jan 17, 2021 · 0 comments
Open

Using algorithms on graph object in React. #15

emilgulayev opened this issue Jan 17, 2021 · 0 comments

Comments

@emilgulayev
Copy link

Hey, I can't figure why this doesn't work:

`let oGraphDOM=useRef({});

...

useEffect(()=>{

...
oGraphDOM.current = new G6.Graph({
...})

},[])

useEffect(()=>{

...
const { length, path } = findShortestPath(oGraphDOM.current, 'A', 'C');
console.log("lenght",length); //undefined
console.log("path",path);//undefined
...

},[])

`

logs undefined although there is a path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant