When using the connect
function in react-redux
, a Higher Order Component is created. From an instance of that HOC, one can access the wrapped instance of the extended component. Is it possible, however, to retrieve the wrapped class from the HOC class?
E.g.:
class A extends React.Component {}
ConnectedA = connect(mapStateToProps, mapDispatch)(A);
ConnectedA.some_static_method_to_get_the_wrapped_class(); // === A
EDIT: For the sake of clarity, I do not have an instance of ConnectedA
available. I need a static method or property. Does that exist?