Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Uncaught TypeError: theme.spacing is not a function

// 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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Uncaught #function
ADD COMMENT
Topic
Name
8+5 =