nathanmarks / jss-theme-reactor

NOT MAINTAINED Powerful theming layer for use with the jss CSS in JS library
MIT License
64 stars 6 forks source link

Why this package ? #33

Closed ilan-schemoul closed 7 years ago

ilan-schemoul commented 7 years ago

Hello, I'm trying to use material-ui@next and I want to use the lib they're using jss. Can you explain what advantages this package brings when compared to react-jss ? The only thing I see is that it returns the theme but I can import it from the file I defined it (for instance to use .breakpoints method). EDIT : I think you should update Readme.md because I may not be the only one who's gonna be confused by this.

oliviertassinari commented 7 years ago

@NitroBAY This package is bringing dynamic theming support as well as predictable class name overrides. I would let @nathanmarks provides more details is I have missed some advantages over react-jss.

ilan-schemoul commented 7 years ago

I am unsure what does that means.

ilan-schemoul commented 7 years ago

By dynamic theming support do you mean that instead of having to import theme from where I defined theme I can directly use it when I define my styles. What does "predictable class name override" means for me ?

nathanmarks commented 7 years ago

@NitroBAY material-ui has the requirement for a big, complex theme as dictated by material design. react-jss does not provide a feature to handle a global theme other than passing it through component props.

ilan-schemoul commented 7 years ago

Okay so I shouldn't use this if I'm doing a simple web app ? The real advantage I could have (if the answer to the first question is yes) is to make the user able to change the theme without reloading the page ?