How can I correctly use Redux compose
to type my component like this:
compose(
withOneThing,
withSecondThing,
connect<type1, type2>(mapStateToProps, mapDispatchToProps),
)(MyComp)
I have been using a hack like this:
as React.FC<PROPS>
Sometimes, however, this is not possible and I resort to something like this:
compose<any>(
withOneThing,
withSecondThing,
connect<type1, type2>(mapStateToProps, mapDispatchToProps),
)(MyComp)
Is there a way to properly type compose
without relying on external libraries like recompose
?