0

I have a react component. I want to use DragSource and Connect in the component.

export default connect(mapStateToProps, matchDispatchToProps)(ExpandableCard);
export default DragSource(Types.CARD, cardSource, collect)(ExpandableCard);

How can I accomodate both the lines for a single component i.e. ExpandableCard

EdG
  • 2,243
  • 6
  • 48
  • 103

1 Answers1

2

Connect "returns a new, connected component class, for you to use", so export default DragSource(Types.CARD, cardSource, collect)(connect(mapStateToProps, matchDispatchToProps)(ExpandableCard)); should do the trick?

Pavel Staselun
  • 1,970
  • 1
  • 12
  • 24