Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6288

Styles not injected via props in material-ui typescript component in react native

$
0
0
import {createStyles, WithStyles} from "@material-ui/core";const styles = (theme: Theme) => createStyles({    root: {}});interface MyProps extends WithStyles<typeof styles> {}export class MyComponent extends Component<MyProps> {    constructor(props: MyProps) {         super(props);        console.log(props.classes); // why this is undefined?     }}

Why props.classes is undefined?


Viewing all articles
Browse latest Browse all 6288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>