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

What about using react-css-modules? #606

Closed
Ndpnt opened this issue Jun 28, 2016 · 13 comments
Closed

What about using react-css-modules? #606

Ndpnt opened this issue Jun 28, 2016 · 13 comments

Comments

@Ndpnt
Copy link
Contributor

Ndpnt commented Jun 28, 2016

For our project we need to use react-css-modules which brings us those features:

  • We do not need to refer to the styles object every time we use a CSS Module
  • But above all, it allows us to mix CSS Modules and global CSS easily, (thing that I found not so easy with only css-loader package)
  • We are warned when styleName refers to an undefined CSS Module

What do you think?
If you are interested, we may provide a PR as we will use it for our needs.

@gihrig
Copy link
Contributor

gihrig commented Jun 29, 2016

I'm just a user of the boilerplate, but I would love to see a PR implementing react-css-modules.

@mxstbr
Copy link
Member

mxstbr commented Jun 29, 2016

If you are interested, we may provide a PR as we will use it for our needs.

Please do, I'd be interested to see it live in action! I haven't personally used it and so far been happy with the way CSS modules work by default, so I can't guarantee we'll merge it but it sounds very useful!

@tzarger
Copy link

tzarger commented Jul 11, 2016

@Ndpnt Are you planning to create a PR for this? I would be interested in seeing this as well. Thank you!

@Ndpnt
Copy link
Contributor Author

Ndpnt commented Jul 11, 2016

@tzarger Yes, I'm planning to create a PR but I'm really busy now. I hope I can do it this week.

@afaayerhan
Copy link

please don't do this. react-css-modules wrap in high order components. adds some more computation. and makes inspecting components in dev tools very inconvinent. also requires you to have some extra changes in build step to extra css .......

@mxstbr
Copy link
Member

mxstbr commented Jul 13, 2016

Thanks for playing devil's advocate here @afaayerhan, let's see what @Ndpnt comes up with!

@Ndpnt
Copy link
Contributor Author

Ndpnt commented Jul 22, 2016

Hi everyone, just to let you know that I'm working on this PR, but I encounter some issues with enzyme's different rendering functions (shallow, mount) in the tests.
So it will be longer than expected.

You can see the progression here (work in progress, history will be rewritten): https://github.com/mxstbr/react-boilerplate/compare/master...soundsgood-co:react-css-modules?expand=1

The missing parts are:

  • Fix tests
  • Add documentation

@ansumanshah
Copy link
Contributor

are we moving ahead with react-css-modules?

@Ndpnt
Copy link
Contributor Author

Ndpnt commented Aug 10, 2016

@ansumanshah Nope, I'm sorry, I'm too busy right now… I don't really know when I will come back on it.

@mxstbr
Copy link
Member

mxstbr commented Sep 18, 2016

Closing due to little interest. I'd still love to see a PR for this if you ever get around to it @Ndpnt!

@mxstbr mxstbr closed this as completed Sep 18, 2016
@hanahub
Copy link

hanahub commented Sep 30, 2016

+1 to @afaayerhan's please don't do this.

It seemed to be fine at the initial phase, but I had very hard time to debug this error on production build.
Fields were losing focus on first character input on redux-form.
Finally find out that's due to react-css-modules (HOC).

@gihrig
Copy link
Contributor

gihrig commented Sep 30, 2016

@vmarinov2013 Thanks for the input. I have little experience with Javascript HOCs (I come from a Java background) In Java the same concept is called AOP (Aspect Oriented Programming).

It's "cool" and easy to implement in some scenarios, but in my experience, It makes debugging very difficult.

@lock
Copy link

lock bot commented May 30, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants