Fix
All checks were successful
Lint / lint (push) Successful in 15s

This commit is contained in:
Julien Valverdé
2025-04-29 19:47:09 +02:00
parent dc2cfb35e0
commit ff5503cfd1

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
) )