Const can not be defined in class in Node?
问题 Where should I put following line to get my component ready? const classes = useStyles(); Try to use Material-UI MenuList component, but need to use in my existing MainPage code, what is slightly different from Material-UI code example. 回答1: I think for class properties, the syntax should be something like class Foo { classes = useStyle(); } 回答2: Could you try to call it inside render lifecycle If i'm not wrong, u can't create const directly inside class, the order should be class > function