Skip to content

Commit

Permalink
No-op state selector should accept a single argument
Browse files Browse the repository at this point in the history
This way `doStatePropsDependOnOwnProps` below will evaluate to `false` for components that don't actually connect to the state.
  • Loading branch information
gaearon committed Dec 24, 2015
1 parent b35f8be commit 04693ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import wrapActionCreators from '../utils/wrapActionCreators'
import hoistStatics from 'hoist-non-react-statics'
import invariant from 'invariant'

const defaultMapStateToProps = () => ({})
const defaultMapStateToProps = state => ({}) // eslint-disable-line no-unused-vars
const defaultMapDispatchToProps = dispatch => ({ dispatch })
const defaultMergeProps = (stateProps, dispatchProps, parentProps) => ({
...parentProps,
Expand Down

0 comments on commit 04693ca

Please sign in to comment.