-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
Description
Sorry if this is a noob react question. I'm trying to add and delete nodes and edges from an existing Sigma component. Currently, my component is set up as so:
<Sigma graph={{nodes:[{id:"n1", label:"Alice"}, {id:"n2", label:"Rabbit"}], edges:[{id:"e1",source:"n1",target:"n2",label:"SEES"}]}} settings={{drawEdges:true}}>
<RelativeSize initialSize={15}/>
<RandomizeNodePositions/>
</Sigma>
I can reach into the component and change Sigma.props.graph
, but have trouble forcing the graph to re-render. How would you recommend doing this?