react-force-graph
react-force-graph copied to clipboard
How to use ref type correct
How correctly add type to ref? Tried different options.
But it is not possible to import this type...
Someone know? All code is red;)
You can do that:
fg: | ForceGraphMethods<NodeObject<GraphNode>, LinkObject<GraphNode, GraphLink>> | undefined
Where `GraphNode` and `GraphLink` are my types for my data.