Reputation: 6917
When using import * as MyActions from 'not/important'
Is it possible to then send all of MyActions
to component props?
connect(mapStateToProps, { MyActions})(MyClass)
Upvotes: 0
Views: 91
Reputation: 343
Yes, it's possible.
connect(mapStateToProps, MyActions)(MyClass)
Or if you want to include more actions from other places, you can use the spread operator ...
:
connect(mapStateToProps, { action1, action2, ...MyActions })(MyClass)
Upvotes: 1