Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make JSS optional #31

Open
Harut opened this issue Aug 4, 2017 · 3 comments
Open

Make JSS optional #31

Harut opened this issue Aug 4, 2017 · 3 comments

Comments

@Harut
Copy link

Harut commented Aug 4, 2017

Hi! I'm using your component in a project, but I really don't want things like JSS to appear in the bundle. I've made a temporary solution by forking and replacing JSS by LESS and hacking around, but it should not be hard to separate a react component from JSS wrapper.

If you are interested but do not have a time for it, I can try to make a pull request

@chadly
Copy link
Owner

chadly commented Aug 22, 2017

Why do you not want JSS to appear in the bundle? Is it the bytes you are worried about? How much space did you save replacing JSS with LESS?

TBH, we used to use a lot of LESS when developing react components and I find JSS to be a breath of fresh air. It takes some getting used to (the same way JSX - mixing markup and JS - did), but I wouldn't want to go back to maintaining LESS with BEM syntax.

@mdarens might have a stronger opinion on this.

@Harut
Copy link
Author

Harut commented Aug 22, 2017

I try to keep my bundle and dependency stack clear and minimal. So as well as we don't use JSS in our project, I don't want it in a bundle as well.

Regarding BEM-syntax, I think, we managed to use it in elegant way, not so verbose and flexible. Thanks to react-bem-helper. And I really don't like an idea to write styles in JS. A language we use for things should be as close as possible to the standard and mainstream (CSS in this case). Sure, it is only my opinion, I don't want to convince you to switch back to LESS :)

And sure, you don't have to add LESS support. It is OK to just expose your components without styles() wrapper. May be, split a *.jsx module to two: with and without styles. It seems to be a little bit tricky but may be, it is possible to think a little bit and find a good solution (but only if you are really interested).

@mdarens
Copy link
Collaborator

mdarens commented Aug 23, 2017

I'm pretty fond of the flexibility and ease of maintenance JSS lends to this project. if we bundled it with a precompiled sheet with BEM syntax, either the style rules or the classNames would need to be overriden. If this can be done in a way that reduces the amount of code in this repo I'm open to it, but I'm pretty biased toward JSS as it's what I use day to day nowadays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants