test-component-with-component-class-type
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

withStyles Bugfix:

eigentliche Implementierung:

export interface NewComponentProps extends ComponentProps {...}
 
const InnerNewComponent: React.SFC<
  NewComponentProps & WithStyles<typeof styles>
> = props => (
    <Component>
        ...
    </Component
)
 
export const NewComponent = withStyles(styles)(InnerNewComponent);

-> sorgt für Fehlermeldung

workaround:

export interface NewComponentProps extends ComponentProps {...}
 
interface InnerNewComponentProps extends WithStyles<typeof styles> {}
 
const InnerNewComponent: React.SFC<
  NewComponentProps & InnerNewComponentProps
> = props => (
    <Component>
        ...
    </Component
)
 
export const NewComponent = withStyles(styles)(InnerNewComponent);

Readme

Keywords

none

Package Sidebar

Install

npm i test-component-with-component-class-type

Weekly Downloads

2

Version

1.0.2

License

UNLICENSED

Unpacked Size

19.8 kB

Total Files

13

Last publish

Collaborators

  • putzisan