In this post, we will see how to resolve How can I style it with @emotion/styled? Old makestyles from mui issue
Question:I’m trying to set up my style via @emotion, since makestyles were removed in React 18. I changed the code in this way in line with my research, but I still can’t see any change in my page.
Normally it should look like this:
But it looks like this:
Best Answer:Two examples are presented below: One with
styled, one without. It is not necessary to use
styled. As you can see from the examples the code without
styledis less verbose and (in my opinion) easier to understand.
In the examples the
Notificationcomponents were replaced with
Example with styled
Example without styled
If you have better answer, please add a comment about this, thank you!