Make nonReactiveTags a Component option
All checks were successful
Lint / lint (push) Successful in 12s
All checks were successful
Lint / lint (push) Successful in 12s
This commit is contained in:
@@ -88,7 +88,7 @@ const use = Effect.fnUntraced(function* <P extends {}, A extends React.ReactNode
|
|||||||
}),
|
}),
|
||||||
Equivalence.array(Equivalence.strict()),
|
Equivalence.array(Equivalence.strict()),
|
||||||
)))[0](Array.from(
|
)))[0](Array.from(
|
||||||
Context.omit(...nonReactiveTags)(runtimeRef.current.context).unsafeMap.values()
|
Context.omit(...self.nonReactiveTags ?? [])(runtimeRef.current.context).unsafeMap.values()
|
||||||
))
|
))
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -96,10 +96,11 @@ const use = Effect.fnUntraced(function* <P extends {}, A extends React.ReactNode
|
|||||||
export interface ComponentOptions {
|
export interface ComponentOptions {
|
||||||
/**
|
/**
|
||||||
* Custom display name for the component in React DevTools and debugging utilities.
|
* Custom display name for the component in React DevTools and debugging utilities.
|
||||||
* Improves developer experience by providing meaningful component identification.
|
|
||||||
*/
|
*/
|
||||||
readonly displayName?: string
|
readonly displayName?: string
|
||||||
|
|
||||||
|
readonly nonReactiveTags?: readonly Context.Tag<any, any>[]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies the execution strategy for finalizers when the component unmounts or its scope closes.
|
* Specifies the execution strategy for finalizers when the component unmounts or its scope closes.
|
||||||
* Determines whether finalizers execute sequentially or in parallel.
|
* Determines whether finalizers execute sequentially or in parallel.
|
||||||
@@ -119,14 +120,12 @@ export interface ComponentOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const defaultOptions: ComponentOptions = {
|
export const defaultOptions: ComponentOptions = {
|
||||||
|
nonReactiveTags: [Tracer.ParentSpan],
|
||||||
finalizerExecutionStrategy: ExecutionStrategy.sequential,
|
finalizerExecutionStrategy: ExecutionStrategy.sequential,
|
||||||
finalizerExecutionDebounce: "100 millis",
|
finalizerExecutionDebounce: "100 millis",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const nonReactiveTags = [Tracer.ParentSpan] as const
|
|
||||||
|
|
||||||
|
|
||||||
export const isComponent = (u: unknown): u is Component<{}, React.ReactNode, unknown, unknown> => Predicate.hasProperty(u, ComponentTypeId)
|
export const isComponent = (u: unknown): u is Component<{}, React.ReactNode, unknown, unknown> => Predicate.hasProperty(u, ComponentTypeId)
|
||||||
|
|
||||||
export declare namespace make {
|
export declare namespace make {
|
||||||
|
|||||||
Reference in New Issue
Block a user