TipeError Uncaught: Theme.spacing bukan fungsi

// I replace that with styled. Its work best for me.
const MyThemeComponent = styled('div')(({ theme }) => ({
  padding: theme.spacing(1),
}));

https://mui.com/styles/api/#examples-4
bilalahmed_dev