nose-pluto/app/nose/bin/counter.tsx
2025-09-26 21:12:48 -07:00

15 lines
264 B
TypeScript

import { stream } from "@/stream"
export default async function () {
let count = 1
return stream(<p>{count}</p>, async ({ replace }) => {
for (let i = 1; i < 10; i++) {
await Bun.sleep(250)
count++
replace(<p>{count}</p>)
}
})
}