@@ -70,7 +70,7 @@ type EffectFunc = (...args: any[]) => void | ReturnType<React.EffectCallback>
70
70
function useIsomorphicLayoutEffectWithArgs (
71
71
effectFunc : EffectFunc ,
72
72
effectArgs : any [ ] ,
73
- dependencies ?: React . DependencyList
73
+ dependencies ?: React . DependencyList ,
74
74
) {
75
75
useIsomorphicLayoutEffect ( ( ) => effectFunc ( ...effectArgs ) , dependencies )
76
76
}
@@ -83,7 +83,7 @@ function captureWrapperProps(
83
83
wrapperProps : unknown ,
84
84
// actualChildProps: unknown,
85
85
childPropsFromStoreUpdate : React . MutableRefObject < unknown > ,
86
- notifyNestedSubs : ( ) => void
86
+ notifyNestedSubs : ( ) => void ,
87
87
) {
88
88
// We want to capture the wrapper props and child props we used for later comparisons
89
89
lastWrapperProps . current = wrapperProps
@@ -110,7 +110,7 @@ function subscribeUpdates(
110
110
childPropsFromStoreUpdate : React . MutableRefObject < unknown > ,
111
111
notifyNestedSubs : ( ) => void ,
112
112
// forceComponentUpdateDispatch: React.Dispatch<any>,
113
- additionalSubscribeListener : ( ) => void
113
+ additionalSubscribeListener : ( ) => void ,
114
114
) {
115
115
// If we're not subscribed to the store, nothing to do here
116
116
if ( ! shouldHandleStateChanges ) return ( ) => { }
@@ -136,7 +136,7 @@ function subscribeUpdates(
136
136
// to determine what the child props should be
137
137
newChildProps = childPropsSelector (
138
138
latestStoreState ,
139
- lastWrapperProps . current
139
+ lastWrapperProps . current ,
140
140
)
141
141
} catch ( e ) {
142
142
error = e
@@ -466,13 +466,13 @@ function connect<
466
466
467
467
// the context consumer to use
468
468
context = ReactReduxContext ,
469
- } : ConnectOptions < unknown , unknown , unknown , unknown > = { }
469
+ } : ConnectOptions < unknown , unknown , unknown , unknown > = { } ,
470
470
) : unknown {
471
471
if ( process . env . NODE_ENV !== 'production' ) {
472
472
if ( pure !== undefined && ! hasWarnedAboutDeprecatedPureOption ) {
473
473
hasWarnedAboutDeprecatedPureOption = true
474
474
warning (
475
- 'The `pure` option has been removed. `connect` is now always a "pure/memoized" component'
475
+ 'The `pure` option has been removed. `connect` is now always a "pure/memoized" component' ,
476
476
)
477
477
}
478
478
}
@@ -486,7 +486,7 @@ function connect<
486
486
const shouldHandleStateChanges = Boolean ( mapStateToProps )
487
487
488
488
const wrapWithConnect = < TProps , > (
489
- WrappedComponent : ComponentType < TProps >
489
+ WrappedComponent : ComponentType < TProps > ,
490
490
) => {
491
491
type WrappedComponentProps = TProps &
492
492
ConnectPropsMaybeWithoutContext < TProps >
@@ -496,8 +496,8 @@ function connect<
496
496
if ( ! isValid )
497
497
throw new Error (
498
498
`You must pass a component to the function returned by connect. Instead received ${ stringifyComponent (
499
- WrappedComponent
500
- ) } `
499
+ WrappedComponent ,
500
+ ) } `,
501
501
)
502
502
}
503
503
@@ -529,7 +529,7 @@ function connect<
529
529
}
530
530
531
531
function ConnectFunction < TOwnProps > (
532
- props : InternalConnectProps & TOwnProps
532
+ props : InternalConnectProps & TOwnProps ,
533
533
) {
534
534
const [ propsContext , reactReduxForwardedRef , wrapperProps ] =
535
535
React . useMemo ( ( ) => {
@@ -548,11 +548,11 @@ function connect<
548
548
if ( process . env . NODE_ENV !== 'production' ) {
549
549
const isValid = /*#__PURE__*/ isContextConsumer (
550
550
// @ts -ignore
551
- < propsContext . Consumer />
551
+ < propsContext . Consumer /> ,
552
552
)
553
553
if ( ! isValid ) {
554
554
throw new Error (
555
- 'You must pass a valid React context consumer as `props.context`'
555
+ 'You must pass a valid React context consumer as `props.context`' ,
556
556
)
557
557
}
558
558
ResultContext = propsContext
@@ -583,7 +583,7 @@ function connect<
583
583
`Could not find "store" in the context of ` +
584
584
`"${ displayName } ". Either wrap the root component in a <Provider>, ` +
585
585
`or pass a custom React context provider to <Provider> and the corresponding ` +
586
- `React context consumer to ${ displayName } in connect options.`
586
+ `React context consumer to ${ displayName } in connect options.` ,
587
587
)
588
588
}
589
589
@@ -609,7 +609,7 @@ function connect<
609
609
// connected to the store via props shouldn't use subscription from context, or vice versa.
610
610
const subscription = createSubscription (
611
611
store ,
612
- didStoreComeFromProps ? undefined : contextValue ! . subscription
612
+ didStoreComeFromProps ? undefined : contextValue ! . subscription ,
613
613
)
614
614
615
615
// `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in
@@ -703,7 +703,7 @@ function connect<
703
703
isMounted ,
704
704
childPropsFromStoreUpdate ,
705
705
notifyNestedSubs ,
706
- reactListener
706
+ reactListener ,
707
707
)
708
708
}
709
709
@@ -730,10 +730,11 @@ function connect<
730
730
actualChildPropsSelector ,
731
731
getServerState
732
732
? ( ) => childPropsSelector ( getServerState ( ) , wrapperProps )
733
- : actualChildPropsSelector
733
+ : actualChildPropsSelector ,
734
734
)
735
735
} catch ( err ) {
736
736
if ( latestSubscriptionCallbackError . current ) {
737
+ // eslint-disable-next-line no-extra-semi
737
738
; (
738
739
err as Error
739
740
) . message += `\nThe error may be correlated with this previous error:\n${ latestSubscriptionCallbackError . current . stack } \n\n`
@@ -797,7 +798,7 @@ function connect<
797
798
if ( forwardRef ) {
798
799
const _forwarded = React . forwardRef ( function forwardConnectRef (
799
800
props ,
800
- ref
801
+ ref ,
801
802
) {
802
803
// @ts -ignore
803
804
return < Connect { ...props } reactReduxForwardedRef = { ref } />
0 commit comments