Skip to content

Commit 04693ca

Browse files
committed
No-op state selector should accept a single argument
This way `doStatePropsDependOnOwnProps` below will evaluate to `false` for components that don't actually connect to the state.
1 parent b35f8be commit 04693ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/connect.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import wrapActionCreators from '../utils/wrapActionCreators'
66
import hoistStatics from 'hoist-non-react-statics'
77
import invariant from 'invariant'
88

9-
const defaultMapStateToProps = () => ({})
9+
const defaultMapStateToProps = state => ({}) // eslint-disable-line no-unused-vars
1010
const defaultMapDispatchToProps = dispatch => ({ dispatch })
1111
const defaultMergeProps = (stateProps, dispatchProps, parentProps) => ({
1212
...parentProps,

0 commit comments

Comments
 (0)