refactor(nodes,edges): data structure

This commit is contained in:
moklick
2019-07-25 16:33:19 +02:00
parent 064f7d9c75
commit 7de43f7843
14 changed files with 197 additions and 169 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ export const Provider = (props) => {
useEffect(() => {
const nextNodes = props.nodes.map(propNode => {
const existingNode = state.nodes.find(n => n.data.id === propNode.data.id);
const existingNode = state.nodes.find(n => n.id === propNode.id);
if (existingNode) {
return {