Revert "perf: eagerly compute explorer nodes to avoid re-render in memoized value"

This reverts commit 16a9caa555.
This commit is contained in:
Jacky Zhao committed 2024-09-20 15:48:14 -07:00
1 parent 4aaeb768d8
commit 9cefcd0dd1
2 files changed
+45 -44

No files matched your search

+9 -4
View File
@@ -224,10 +224,15 @@ export function ExplorerNode({ node, opts, fullPath, fileData }: ExplorerNodePro
class="content"
data-folderul={folderPath}
>
{node.children.map((childNode) =>
// eagerly render children so we can memoize properly
ExplorerNode({ node: childNode, opts, fileData, fullPath: folderPath }),
)}
{node.children.map((childNode, i) => (
<ExplorerNode
node={childNode}
key={i}
opts={opts}
fullPath={folderPath}
fileData={fileData}
/>
))}
</ul>
</div>
</li>