0.1.13 #18

Merged
Thilawyn merged 359 commits from next into master 2025-06-18 00:12:19 +02:00
Showing only changes of commit aa6c4a8008 - Show all commits

View File

@@ -12,13 +12,12 @@ function Count() {
const runSync = R.useRunSync() const runSync = R.useRunSync()
const countRef = R.useRef(() => Effect.succeed(0)) const countRef = R.useRef(() => Effect.succeed(0))
const [count] = R.useRefState(countRef) const [count] = R.useSubscribeRefs(countRef)
return ( return (
<div className="container mx-auto"> <div className="container mx-auto">
{/* <button onClick={() => setCount((count) => count + 1)}> */} <button onClick={() => runSync(Ref.update(countRef, count => count + 1))}>
<button onClick={() => Ref.update(countRef, count => count + 1).pipe(runSync)}>
count is {count} count is {count}
</button> </button>
</div> </div>