Skip to content

Instantly share code, notes, and snippets.

@xhawk
Created October 19, 2017 11:04
Show Gist options
  • Save xhawk/0f95af1b6bfba1b24e0c6a22b086e683 to your computer and use it in GitHub Desktop.
Save xhawk/0f95af1b6bfba1b24e0c6a22b086e683 to your computer and use it in GitHub Desktop.
let actionCreators {
save: (asd: string): SetSensorAction => {
return {type: "SET_SENSOR", payload: asd}
}
}
type EditProps =
RouteComponentProps<{}>
& type actionCreators
& ApplicationState
export class Edit extends React.Component<EditProps, {}> {
save() {
this.props.save("hei");
}
}
export default connect((state: ApplicationState) => state, actionCreators)(Edit) as typeof Edit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment