ยฉ 2026 Hedgehog Software, LLC
function Counter() { const [count, setCount] = createSignal(1); const increment = () => setCount(count() + 1); const arr: number[] = []; const memo = createMemo(() => ((arr[0] = count()), arr), { equals: false }); createEffect(() => console.log(memo())) return ( <button type="button" onClick={increment}> {memo().join(', ')} </button> ); }