diff --git a/cypress/integration/flow/basic.spec.js b/cypress/integration/flow/basic.spec.js
index afe43550..a073a03a 100644
--- a/cypress/integration/flow/basic.spec.js
+++ b/cypress/integration/flow/basic.spec.js
@@ -1,4 +1,4 @@
-describe('Basic Graph Rendering', () => {
+describe('Basic Flow Rendering', () => {
it('renders a flow with three nodes', () => {
cy.visit('/basic');
diff --git a/cypress/integration/flow/custom-node.js b/cypress/integration/flow/custom-node.js
index 644746e8..4cecdcec 100644
--- a/cypress/integration/flow/custom-node.js
+++ b/cypress/integration/flow/custom-node.js
@@ -1,5 +1,5 @@
-describe('Custom Node Graph Rendering', () => {
- it('renders a graph', () => {
+describe('Custom Node Flow Rendering', () => {
+ it('renders a flow', () => {
cy.visit('/custom-node');
cy.get('.react-flow__renderer');
diff --git a/cypress/integration/flow/empty.spec.js b/cypress/integration/flow/empty.spec.js
index 4d0b48cf..d4029107 100644
--- a/cypress/integration/flow/empty.spec.js
+++ b/cypress/integration/flow/empty.spec.js
@@ -1,5 +1,5 @@
describe('Empty Flow Rendering', () => {
- it('renders an empty graph', () => {
+ it('renders an empty flow', () => {
cy.visit('/empty');
cy.get('.react-flow__renderer');
diff --git a/cypress/integration/flow/interaction.spec.js b/cypress/integration/flow/interaction.spec.js
index 94b97b19..33e672ce 100644
--- a/cypress/integration/flow/interaction.spec.js
+++ b/cypress/integration/flow/interaction.spec.js
@@ -1,5 +1,5 @@
-describe('Interaction Graph Rendering', () => {
- it('renders a graph', () => {
+describe('Interaction Flow Rendering', () => {
+ it('renders initial flow', () => {
cy.visit('/interaction');
cy.get('.react-flow__renderer');
diff --git a/cypress/integration/flow/overview.spec.js b/cypress/integration/flow/overview.spec.js
index e072b834..d0153db2 100644
--- a/cypress/integration/flow/overview.spec.js
+++ b/cypress/integration/flow/overview.spec.js
@@ -1,5 +1,5 @@
-describe('Overview Graph Rendering', () => {
- it('renders a graph', () => {
+describe('Overview Flow Rendering', () => {
+ it('renders a flow', () => {
cy.visit('/');
cy.get('.react-flow__renderer');
diff --git a/cypress/integration/flow/stress.spec.js b/cypress/integration/flow/stress.spec.js
index e289ef11..d70b5847 100644
--- a/cypress/integration/flow/stress.spec.js
+++ b/cypress/integration/flow/stress.spec.js
@@ -1,5 +1,5 @@
-describe('Stress Graph Rendering', () => {
- it('renders a graph', () => {
+describe('Stress Flow Rendering', () => {
+ it('renders initial flow', () => {
cy.visit('/stress');
cy.get('.react-flow__renderer');
diff --git a/example/src/Basic/index.js b/example/src/Basic/index.js
index 2cb4f068..2e386b24 100644
--- a/example/src/Basic/index.js
+++ b/example/src/Basic/index.js
@@ -2,9 +2,9 @@ import React, { useState } from 'react';
import ReactFlow, { removeElements, addEdge, isNode, Background } from 'react-flow-renderer';
-const onNodeDragStop = node => console.log('drag stop', node);
-const onLoad = reactFlowInstance => console.log('graph loaded:', reactFlowInstance);
-const onElementClick = element => console.log('click', element);
+const onNodeDragStop = (node) => console.log('drag stop', node);
+const onLoad = (reactFlowInstance) => console.log('flow loaded:', reactFlowInstance);
+const onElementClick = (element) => console.log('click', element);
const initialElements = [
{ id: '1', type: 'input', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
@@ -17,20 +17,19 @@ const initialElements = [
const BasicFlow = () => {
const [elements, setElements] = useState(initialElements);
- const onElementsRemove = (elementsToRemove) =>
- setElements(els => removeElements(elementsToRemove, els));
- const onConnect = (params) => setElements(els => addEdge(params, els));
+ const onElementsRemove = (elementsToRemove) => setElements((els) => removeElements(elementsToRemove, els));
+ const onConnect = (params) => setElements((els) => addEdge(params, els));
const updatePos = () => {
- setElements(elms => {
- return elms.map(el => {
+ setElements((elms) => {
+ return elms.map((el) => {
if (isNode(el)) {
return {
...el,
position: {
x: Math.random() * 400,
- y: Math.random() * 400
- }
+ y: Math.random() * 400,
+ },
};
}
@@ -54,14 +53,11 @@ const BasicFlow = () => {
>
-