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
From this example on the documentation https://codesandbox.io/s/gk0do5?file=/App.tsx:626-688 I understand that we can have the graph data prop as a state to modify the graph dynamically (Graphin component refreshed when the graph data prop is modified via useState).
But this approach is not really compatible with the use of GraphinContext because modifications made to the graph via the context aren't persisted in the graph data prop, and thus disappear if the data prop is modified in the state and the Graphin component refreshed.
Do you have any recommendation on which of those two APIs should be used for write operations on the graph ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello !
From this example on the documentation https://codesandbox.io/s/gk0do5?file=/App.tsx:626-688 I understand that we can have the graph data prop as a state to modify the graph dynamically (
Graphin
component refreshed when the graph data prop is modified viauseState
).But this approach is not really compatible with the use of
GraphinContext
because modifications made to the graph via the context aren't persisted in the graph data prop, and thus disappear if the data prop is modified in the state and theGraphin
component refreshed.Do you have any recommendation on which of those two APIs should be used for write operations on the graph ?
Beta Was this translation helpful? Give feedback.
All reactions