Created
October 19, 2017 11:04
-
-
Save xhawk/0f95af1b6bfba1b24e0c6a22b086e683 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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