diff --git a/.changeset/stale-owls-turn.md b/.changeset/stale-owls-turn.md new file mode 100644 index 00000000..60687a4d --- /dev/null +++ b/.changeset/stale-owls-turn.md @@ -0,0 +1,5 @@ +--- +'@xyflow/react': patch +--- + +Fix internal behaviour that mutated user nodes which led to an issue with Redux and immer diff --git a/packages/react/src/store/index.ts b/packages/react/src/store/index.ts index c4dc42b6..067f4093 100644 --- a/packages/react/src/store/index.ts +++ b/packages/react/src/store/index.ts @@ -20,6 +20,7 @@ import { import { applyEdgeChanges, applyNodeChanges, createSelectionChange, getSelectionChanges } from '../utils/changes'; import getInitialState from './initialState'; import type { ReactFlowState, Node, Edge, UnselectNodesAndEdgesParams, FitViewOptions } from '../types'; + const createStore = ({ nodes, edges,