Guest User

Untitled

a guest
Dec 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. import * as React from "react"
  2. import {connect, Dispatch} from "react-redux"
  3. import {RootState} from "../store";
  4. import {StyledComponentProps, Theme} from "@material-ui/core";
  5. import withStyles from "@material-ui/core/styles/withStyles";
  6.  
  7. const styles = (theme: Theme) => ({
  8. root: {
  9.  
  10. }
  11. });
  12.  
  13. const mapStateToProps = (state: RootState) => ({
  14.  
  15. });
  16.  
  17. const mapDispatchToProps = (dispatch: Dispatch<RootState>) => ({
  18.  
  19. });
  20.  
  21. interface IMyComponentProps extends ReturnType<typeof mapStateToProps>,
  22. ReturnType<typeof mapDispatchToProps>,
  23. StyledComponentProps<keyof ReturnType<typeof styles>>
  24. {
  25.  
  26. }
  27.  
  28. interface IMyComponentState {
  29.  
  30. }
  31.  
  32. class MyComponent extends React.Component<IMyComponentProps, IMyComponentState> {
  33.  
  34. render() {
  35. return <div></div>
  36. }
  37. }
  38.  
  39.  
  40. export default withStyles(styles as any)(connect(mapStateToProps, mapDispatchToProps)(MyComponent))
Add Comment
Please, Sign In to add comment