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
We can see that the functions onEdgeChange, onEdgeUpdate, onEdgeClick, onNodeClick, onNodeDragStop, onSelectionStart, onSelectionEnd, snapGrid are listed to cause a rerender when they should not. By wrapping these functions in a useCallBack we can avoid this issue.
The ReactFlow component should be rerendered (in this case) only if the prop nodes is changed (it is changed after a setNodes)
The text was updated successfully, but these errors were encountered:
Here is a Flamegraph after moving a node
We can see that the functions onEdgeChange, onEdgeUpdate, onEdgeClick, onNodeClick, onNodeDragStop, onSelectionStart, onSelectionEnd, snapGrid are listed to cause a rerender when they should not. By wrapping these functions in a useCallBack we can avoid this issue.
The ReactFlow component should be rerendered (in this case) only if the prop nodes is changed (it is changed after a setNodes)
The text was updated successfully, but these errors were encountered: