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

'editor' is not defined, and unable to access editor methods in react hooks #621

Open
linonetwo opened this issue Jul 9, 2023 · 2 comments

Comments

@linonetwo
Copy link

function fitGraphInView() {
editor.triggerFit();
}

This is undefined.

And how to access those exitor.xxx methods?

const appContainerReference = useRef<HTMLDivElement>(null);

<TheGraph.App
ref={appContainerReference}
/>

This only get null and said

React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
@linonetwo
Copy link
Author

linonetwo commented Jul 9, 2023

This never work since 2018 #360 (comment)

@jonnor @bergie

@linonetwo
Copy link
Author

When click on nav in https://flowhub.github.io/the-graph/demo-full.html

图片

图片

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