Should classes be optional in withStyles
See original GitHub issuehttps://github.com/mui-org/material-ui/blob/v1-beta/src/styles/withStyles.d.ts#L32
Would it make sense for this to be optional so that I don’t end up with components that expect me to provide classes
?
Type '{ tags: string[]; onChange: () => any; }' is not assignable to type 'IntrinsicAttributes & Props & StyledComponentProps<"root"> & { children?: ReactNode; }'.
Type '{ tags: string[]; onChange: () => any; }' is not assignable to type 'Props'.
Property 'classes' is missing in type '{ tags: string[]; onChange: () => any; }'.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Should classes be optional in withStyles · Issue #10357 - GitHub
Should classes be optional in withStyles #10357 ... One thing you can do is separate WithStyles from your props (this is how we...
Read more >How to type classes when passing them as a prop in material ui
You can style a material-ui component by passing a single string className ... The type Styles<Theme, Props, ClassKey> takes three optional ...
Read more >Styles API - MUI System
The string used to prefix the class names in production. options.seed (string [optional]): Defaults to '' . The string used to uniquely identify...
Read more >Styles and classes - The Modern JavaScript Tutorial
We should always prefer CSS classes to style . The latter should only be used if classes “can't handle it”. For example, style...
Read more >Going to school is optional: Schools need to engage students ...
Moreover, unexcused class absences on days when students are in school explains almost all of the increase in total absences in high school....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And suddenly there was peace in my compiler again. Phew, thanks for the lesson. I think I’m going to go clean up all my props now and probably eliminate a whole bunch of issues.
Seriously, thank you so much!
Closing this since the original issue was resolved and the new issue is incomplete.
@atrauzzi If you still encounter problems please open a new issue and follow the template.