-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Unless contextTypes is set manually on the target component, the flux prop is missing and no context is sent to listenTo() or getProps.
As a workaround, I currently have this middleware:
import React from 'react';
import { connect } from 'alt-react';
module.exports = function (Ele, opt) {
Ele.contextTypes = {
flux: React.PropTypes.object
};
return connect(Ele, opt);
};
It would be good if connect automatically added contextTypes to the target element if it doesn't already exist, or extends it with flux if it does.
Metadata
Metadata
Assignees
Labels
No labels