Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
123
rated 0 times [  127] [ 4]  / answers: 1 / hits: 32823  / 5 Years ago, sat, february 9, 2019, 12:00:00

Description


I am trying to use Material-UI's theme.spacing function in a React application but the spacing function is not recognized.


The Javascript error message is: TypeError: theme.spacing is not a function


I am unsure if this is a bug or I have something wrong with the frameworks versions being installed.




Context



These are the frameworks versions being installed, according to the package-lock.json file:



  • Material-UI: v3.9.2

  • React: v16.8.1

  • Chrome: v72.0.3626.96

  • TypeScript: None

  • create-react-app: v3.2.2


More From » reactjs

 Answers
12

Well, it turns out this is a bug after all, caused by request #14099.



A fix is on the way now, so I am closing this question.


[#52628] Monday, February 4, 2019, 5 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
samaraanandah

Total Points: 94
Total Questions: 86
Total Answers: 99

Location: Montenegro
Member since Thu, Jun 16, 2022
2 Years ago
;