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

This reverts commit 16a9caa555.
This commit is contained in:
Jacky Zhao 2024-09-20 15:48:06 -07:00
parent 4aaeb768d8
commit 9cefcd0dd1
2 changed files with 45 additions and 44 deletions
quartz/components

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>