I'm not exactly sure why it's complaining as I'm pretty sure I've hooked everything up correctly, my component class is as follows:
type SubmitLinkPopupProps =
SubmitLinkPopupStore.SubmitLinkPopupState
& typeof SubmitLinkPopupStore.actionCreators
& RouteComponentProps<{}>;
type SubmitLinkPopupAllProps = SubmitLinkPopupProps;// & InputSubmitLinkProps;
export class SubmitLinkPopup extends Component<SubmitLinkPopupAllProps, SubmitLinkPopupStore.SubmitLinkPopupState>
{
constructor(props: SubmitLinkPopupAllProps) {
super(props);
this.SubmitLink = this.SubmitLink.bind(this);
this.handleClose = this.handleClose.bind(this);
this.handleTextFieldChange = this.handleTextFieldChange.bind(this);
}
handleOpen = () => {
//...
};
handleClose = () => {
//...
};
handleTextFieldChange(e) {
//...
};
SubmitLink() {
//...
}
public render() {
//...
}
}
export default connect((state: Store.RootState) => state.submitLinkPopup, SubmitLinkPopupStore.actionCreators)(SubmitLinkPopup);
and the reducer looks like this:
export const actionCreators = {
//...
}
type KnownAction = RequestSubmitLinkAction | CancelSubmitLinkAction;
const submitLinkPopupReducer: Reducer<SubmitLinkPopupState> =
(state: SubmitLinkPopupState, incomingAction: KnownAction) => {
//...
}
export default submitLinkPopupReducer;
It's all hooked up in the store:
export interface RootState {
submitLinkPopup: SubmitLinkPopupState
}
const rootReducer = combineReducers({
submitLinkPopup: submitLinkPopupReducer,
})
const rootStore = createStore(
rootReducer,
applyMiddleware(middleware),
)
export default rootStore
This was working in a previous React-Redux project I was working in, I'm not sure what config might be missing which causes this issue.