Skip to content

Instantly share code, notes, and snippets.

@vojto
Created March 5, 2020 14:03
Show Gist options
  • Save vojto/e6d6c9c5f2805b1e4918835ae977c3d4 to your computer and use it in GitHub Desktop.
Save vojto/e6d6c9c5f2805b1e4918835ae977c3d4 to your computer and use it in GitHub Desktop.
import React from "react";
import {Stage} from "@inlet/react-pixi";
export const Graph: React.FC<{
nodes: Node[];
edges: Edge[];
}> = (props) => {
return (
<Stage>
{props.edges.map((edge) => {
<EdgeView edge={edge} />;
})}
{props.nodes.map((node) => {
<NodeView node={node} />;
})}
</Stage>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment