I've been busy developing a small web application using ReactJS and Material UI. In the documentation examples, many components include useStyles within the code. I've decided to follow suit and now have a useStyles function in each of my components. My question is: is this considered good practice? Typically, I keep all my classes in a separate CSS file for easier management. However, for this project, I wanted to adhere to the CSS-in-JS pattern.
You can take a look at an example of my code here: https://github.com/sickdyd/foriio/blob/master/src/components/body/UserProfile.js
Thank you in advance for any clarification you can provide.