siriwatknp / mui-treasury

A collection of ready-to-use components based on Material-UI
https://mui-treasury.com
MIT License
2.38k stars 150 forks source link

Styled Components or Material UI Styles #780

Closed sstubbs closed 4 years ago

sstubbs commented 4 years ago

Sorry if I've missed this in the documentation but is there a reason why you are using material ui styles and styled components in the demo at https://codesandbox.io/s/material-ui-layout-7mn9xq3nnj

I'm trying to decide which to use and whether I need both in a new project.

siriwatknp commented 4 years ago

You need both in order to use Layout v4 due to this issue https://github.com/mui-org/material-ui/issues/20521.

I tried to not introduce other css-in-jss apart from jss that material-ui is using but from the issue above jss is not enough, that's why styled-components or @emotion/styled is needed.

siriwatknp commented 4 years ago

I recommend styled-components since Material-UI is adopting it in v5. Other questions is welcome.

sstubbs commented 4 years ago

Ok great thanks a lot.