This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import * as LazyRef from "@typed/lazy-ref"
|
||||
import { Effect, Stream } from "effect"
|
||||
import * as React from "react"
|
||||
import { ReffuseExtension, type ReffuseHelpers, SetStateAction } from "reffuse"
|
||||
import { ReffuseExtension, type ReffuseNamespace, SetStateAction } from "reffuse"
|
||||
|
||||
|
||||
export const LazyRefExtension = ReffuseExtension.make(() => ({
|
||||
useLazyRefState<A, E, R>(
|
||||
this: ReffuseHelpers.ReffuseHelpers<R>,
|
||||
this: ReffuseNamespace.ReffuseNamespace<R>,
|
||||
ref: LazyRef.LazyRef<A, E, R>,
|
||||
): [A, React.Dispatch<React.SetStateAction<A>>] {
|
||||
const initialState = this.useMemo(() => ref, [], { doNotReExecuteOnRuntimeOrContextChange: true })
|
||||
|
||||
Reference in New Issue
Block a user