import { useState } from 'preact/hooks'; /** a counter written in Preact */ export function PreactCounter({ children }) { const [count, setCount] = useState(0); const add = () => setCount((i) => i + 1); const subtract = () => setCount((i) => i - 1); return ( <>
{count}
{children}
); } bun/'>bun
Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/bench/snippets/object-values.mjs (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2023-07-04[tls] fix servername (#3513)Gravatar Ciro Spaciari 4-8/+109
2023-07-04Add alias for readBigUInt64BE ... (#3514)Gravatar Ai Hoshino 2-4/+58
2023-07-04reduce countGravatar Jarred Sumner 1-2/+2
2023-07-04bumpGravatar Jarred Sumner 3-2/+2
2023-07-04Fix crashGravatar Jarred Sumner 1-5/+8