saikat / react-apollo-starter-kit

A production-ready starter kit for making a React/Apollo application.
MIT License
186 stars 28 forks source link

LocalCounter.jsx raises error: TypeError: mapState is not a function #12

Closed grayontheweb closed 8 years ago

grayontheweb commented 8 years ago

Using this starter kit as a launching point and noticed this issue. Currently src/containers/LocalCounter.jsx is exporting a connect function with an object containing the mapStateToProps and mapDispatchToProps functions:

export default connect({
  mapStateToProps,
  mapDispatchToProps
})(LocalCounter)

This raises a TypeError for me and was fixable by passing two function arguments rather than an object containing them:

export default connect(
  mapStateToProps,
  mapDispatchToProps
)(LocalCounter)
saikat commented 8 years ago

Thanks @grayontheweb -- could you submit a pull request with your fix?

grayontheweb commented 8 years ago

Sure, no problem.