the-graph icon indicating copy to clipboard operation
the-graph copied to clipboard

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

Open linonetwo opened this issue 1 year ago • 2 comments

https://github.com/flowhub/the-graph/blob/6f6823fcd1a0956532ec68357a84aee2740e2640/examples/demo-full.js#L62-L64

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 avatar Jul 09 '23 08:07 linonetwo