0.1.0 #1

Merged
Thilawyn merged 87 commits from next into master 2025-01-18 00:54:42 +01:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 6448061c8d - Show all commits

View File

@@ -272,7 +272,7 @@ export class Reffuse<R> {
const setValue = React.useCallback((setStateAction: React.SetStateAction<A>) => const setValue = React.useCallback((setStateAction: React.SetStateAction<A>) =>
runSync(Ref.update(ref, previousState => runSync(Ref.update(ref, previousState =>
SetStateAction.get(setStateAction, previousState) SetStateAction.value(setStateAction, previousState)
)), )),
[ref]) [ref])

View File

@@ -2,7 +2,7 @@ import { Function } from "effect"
import type React from "react" import type React from "react"
export const get: { export const value: {
<S>(prevState: S): (setStateAction: React.SetStateAction<S>) => S <S>(prevState: S): (setStateAction: React.SetStateAction<S>) => S
<S>(setStateAction: React.SetStateAction<S>, prevState: S): S <S>(setStateAction: React.SetStateAction<S>, prevState: S): S
} = Function.dual(2, <S>(self: React.SetStateAction<S>, prevState: S): S => } = Function.dual(2, <S>(self: React.SetStateAction<S>, prevState: S): S =>