Enforces that all connect arguments have recommended names. (react-redux/connect-prefer-named-arguments)
react-redux connect function has 4 optional arguments:
- mapStateToProps
- mapDispatchToProps
- mergeProps
- options
This rule enforces that all of the provided parameters should follow the above naming conventions.
The following patterns are considered incorrect:
connect(mapStateToProps, actionCreators)(TodoApp)
connect(state => state)(TodoApp)
The following patterns are considered correct:
connect(mapStateToProps, mapDispatchToProps, mergeProps)(TodoApp)
connect()(TodoApp)