Browse Source

memoize graph

AykutSarac 2 years ago
parent
commit
c5521a4b27
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/components/Graph/index.tsx

+ 3 - 1
src/components/Graph/index.tsx

@@ -38,7 +38,7 @@ const StyledEditorWrapper = styled.div<{ isWidget: boolean }>`
   }
 `;
 
-export const Graph = ({
+const GraphComponent = ({
   isWidget,
   openModal,
   setSelectedNode,
@@ -130,3 +130,5 @@ export const Graph = ({
     </StyledEditorWrapper>
   );
 };
+
+export const Graph = React.memo(GraphComponent);