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()),
|
||||
)))[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 {
|
||||
/**
|
||||
* Custom display name for the component in React DevTools and debugging utilities.
|
||||
* Improves developer experience by providing meaningful component identification.
|
||||
*/
|
||||
readonly displayName?: string
|
||||
|
||||
readonly nonReactiveTags?: readonly Context.Tag<any, any>[]
|
||||
|
||||
/**
|
||||
* Specifies the execution strategy for finalizers when the component unmounts or its scope closes.
|
||||
* Determines whether finalizers execute sequentially or in parallel.
|
||||
@@ -119,14 +120,12 @@ export interface ComponentOptions {
|
||||
}
|
||||
|
||||
export const defaultOptions: ComponentOptions = {
|
||||
nonReactiveTags: [Tracer.ParentSpan],
|
||||
finalizerExecutionStrategy: ExecutionStrategy.sequential,
|
||||
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 declare namespace make {
|
||||
|
||||
Reference in New Issue
Block a user