Skip to content

Commit 2a88cf9

Browse files
authored
Remove unnecessary calculations for rendering files (codesandbox#4078)
* Greatly improve file switching performance * Don't update callback even if state changes * Remove unnecessary property * Remove unnecessary change
1 parent 12dd9e4 commit 2a88cf9

File tree

4 files changed

+0
-4
lines changed

4 files changed

+0
-4
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/DirectoryChildren/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ const DirectoryChildren: React.FC<IDirectoryChildrenProps> = ({
6262
.map(dir => (
6363
<DirectoryEntry
6464
key={dir.id}
65-
siblings={[...directories, ...modules]}
6665
depth={depth + 1}
6766
signals={{ files, editor }}
6867
store={{ editor: editorState, isLoggedIn }}

packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ interface Props {
6161
connectDropTarget?: Function;
6262
isOver?: boolean;
6363
canDrop?: boolean;
64-
siblings?: any;
6564
signals?: any;
6665
title?: string;
6766
sandboxId?: string;

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Explorer/Files/DirectoryEntry/DirectoryChildren/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ const DirectoryChildren: React.FC<IDirectoryChildrenProps> = ({
6262
.map(dir => (
6363
<DirectoryEntry
6464
key={dir.id}
65-
siblings={[...directories, ...modules]}
6665
depth={depth + 1}
6766
signals={{ files, editor }}
6867
store={{ editor: editorState, isLoggedIn }}

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Explorer/Files/DirectoryEntry/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ interface Props {
6161
connectDropTarget?: Function;
6262
isOver?: boolean;
6363
canDrop?: boolean;
64-
siblings?: any;
6564
signals?: any;
6665
title?: string;
6766
sandboxId?: string;

0 commit comments

Comments
 (0)