You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>A set of react components to display graphs with Sigma v2.<br>This project is in beta test.</p>
2778
+
<p>A set of react components to display graphs with Sigma v2.</p>
2779
2779
<p>You can find some online examples here : <ahref="https://sim51.github.io/react-sigma-v2/examples/">https://sim51.github.io/react-sigma-v2/examples/</a></p>
2780
+
<p>Or test it on cocdesanbox with this link: <ahref="https://githubbox.com/sim51/react-sigma-v2/tree/main/demo">https://githubbox.com/sim51/react-sigma-v2/tree/main/demo</a></p>
<p>This library shares the same philosophy as <ahref="https://react-leaflet.js.org">react-leaflet</a>, it just provides some bindings (and helpers) between React and Sigma.</p>
2784
2785
<p>The main component, ie. <code>SigmaContainer</code> create a Sigma instance with an empty graph. If its option <code>initialSettings</code> or <code>graphOptions</code> is updated, the instance is killed and re-created.</p>
2785
-
<p>I recommend you to NOT UPDATE those options to avoid performance issues.<br>Sigma (& graphology) comes with methods that allow the user to update the settings.</p>
2786
+
<p>I recommend you to NOT UPDATE those options to avoid performance issues.<br>Sigma (& graphology) comes with methods that allow users to update the settings.<br>You should treat it as an immutable component.</p>
2786
2787
<p>Every child has access to the sigma instance (and so the graph instance) via the React context created by the <code>SigmaContainer</code>.</p>
2787
2788
<p>In your components, you can use the hook <code>const sigma = useSigma()</code> that gives you the sigma instance (and so the underlying graph with <code>sigma.getGraph()</code>)</p>
2788
2789
<p>This is an example of how to display a graph :</p>
<li>Defined in <ahref="https://github.com/sim51/react-sigma-v2/blob/8fbc622/src/controls/ControlsContainer.tsx#L45">controls/ControlsContainer.tsx:45</a></li>
3049
+
<li>Defined in <ahref="https://github.com/sim51/react-sigma-v2/blob/d46e7c5/src/controls/ControlsContainer.tsx#L45">controls/ControlsContainer.tsx:45</a></li>
<li>Defined in <ahref="https://github.com/sim51/react-sigma-v2/blob/8fbc622/src/controls/ForceAtlasControl.tsx#L66">controls/ForceAtlasControl.tsx:66</a></li>
3071
+
<li>Defined in <ahref="https://github.com/sim51/react-sigma-v2/blob/d46e7c5/src/controls/ForceAtlasControl.tsx#L66">controls/ForceAtlasControl.tsx:66</a></li>
<li>Defined in <ahref="https://github.com/sim51/react-sigma-v2/blob/8fbc622/src/controls/FullScreenControl.tsx#L59">controls/FullScreenControl.tsx:59</a></li>
3093
+
<li>Defined in <ahref="https://github.com/sim51/react-sigma-v2/blob/d46e7c5/src/controls/FullScreenControl.tsx#L59">controls/FullScreenControl.tsx:59</a></li>
0 commit comments