Commit 9fad1144 authored by timel's avatar timel

optimize: remove useless snap

parent 59b3f4d9
...@@ -24,10 +24,10 @@ export const Mat: React.FC = () => { ...@@ -24,10 +24,10 @@ export const Mat: React.FC = () => {
}; };
const Cards: React.FC = () => { const Cards: React.FC = () => {
const snap = useSnapshot(cardStore.inner); const length = cardStore.inner.length;
return ( return (
<> <>
{snap.map((_cardSnap, i) => ( {Array.from({ length }).map((_, i) => (
<Card key={i} idx={i} /> <Card key={i} idx={i} />
))} ))}
</> </>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment