flowhub / the-graph

SVG custom elements for FBP graph editing and visualization. Used in noflo/noflo-ui
https://flowhub.github.io/the-graph/demo-full.html
MIT License
1.01k stars 180 forks source link

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

Open linonetwo opened 12 months ago

linonetwo commented 12 months ago

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 commented 12 months ago

This never work since 2018 https://github.com/flowhub/the-graph/issues/360#issuecomment-360729234

@jonnor @bergie

linonetwo commented 12 months ago

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

图片

图片