@@ -29,11 +29,17 @@ function match(arg, factories, name) {
29
29
}
30
30
31
31
return ( dispatch , options ) => {
32
- throw new Error ( `Invalid value of type ${ typeof arg } for ${ name } argument when connecting component ${ options . wrappedComponentName } .` )
32
+ throw new Error (
33
+ `Invalid value of type ${ typeof arg } for ${ name } argument when connecting component ${
34
+ options . wrappedComponentName
35
+ } .`
36
+ )
33
37
}
34
38
}
35
39
36
- function strictEqual ( a , b ) { return a === b }
40
+ function strictEqual ( a , b ) {
41
+ return a === b
42
+ }
37
43
38
44
// createConnect with default args builds the 'official' connect behavior. Calling it with
39
45
// different options opens up some testing and extensibility scenarios
@@ -57,15 +63,23 @@ export function createConnect({
57
63
...extraOptions
58
64
} = { }
59
65
) {
60
- const initMapStateToProps = match ( mapStateToProps , mapStateToPropsFactories , 'mapStateToProps' )
61
- const initMapDispatchToProps = match ( mapDispatchToProps , mapDispatchToPropsFactories , 'mapDispatchToProps' )
66
+ const initMapStateToProps = match (
67
+ mapStateToProps ,
68
+ mapStateToPropsFactories ,
69
+ 'mapStateToProps'
70
+ )
71
+ const initMapDispatchToProps = match (
72
+ mapDispatchToProps ,
73
+ mapDispatchToPropsFactories ,
74
+ 'mapDispatchToProps'
75
+ )
62
76
const initMergeProps = match ( mergeProps , mergePropsFactories , 'mergeProps' )
63
77
64
78
return connectHOC ( selectorFactory , {
65
79
// used in error messages
66
80
methodName : 'connect' ,
67
81
68
- // used to compute Connect's displayName from the wrapped component's displayName.
82
+ // used to compute Connect's displayName from the wrapped component's displayName.
69
83
getDisplayName : name => `Connect(${ name } )` ,
70
84
71
85
// if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
0 commit comments