I usually use makeStyles for writing styles, but now i had to use MUI table and in its documentation styling was done by withStyles. Can some one tell how they are different?
Asked
Active
Viewed 1,519 times
1 Answers
7
The main difference is that makeStyle/useStyle is being used at function components as a hook, and withStyles is an higher order component.
useStyle and withStyles provide the same functionality and take the same style object params.
you should use withStyles when you develop apps with React version that doens't support hooks yet, or when you style a class-based component.

Eyal Cohen
- 1,188
- 2
- 15
- 27