@reffuse/extension-query 0.1.5 #16

Merged
Thilawyn merged 347 commits from next into master 2025-06-01 05:28:47 +02:00
Showing only changes of commit ff5503cfd1 - Show all commits

View File

@@ -380,10 +380,10 @@ export abstract class ReffuseNamespace<R> {
useRef<A, R>( useRef<A, R>(
this: ReffuseNamespace<R>, this: ReffuseNamespace<R>,
value: A, initialValue: A,
): SubscriptionRef.SubscriptionRef<A> { ): SubscriptionRef.SubscriptionRef<A> {
return this.useMemo( return this.useMemo(
() => SubscriptionRef.make(value), () => SubscriptionRef.make(initialValue),
[], [],
{ doNotReExecuteOnRuntimeOrContextChange: true }, // Do not recreate the ref when the context changes { doNotReExecuteOnRuntimeOrContextChange: true }, // Do not recreate the ref when the context changes
) )