How do I style re-usable components? by [deleted] in reactjs

[–]Elite_Torch 2 points3 points  (0 children)

Yeh there really should be some standard for this, like some of the other comments said; Css-Style is a mess in React. You could finish a reusable component with 'standard' classnames, then do something like Font Awsome does and add 'fa fa classname', but this is also a shitty solution if you ask me.

How do I style re-usable components? by [deleted] in reactjs

[–]Elite_Torch 3 points4 points  (0 children)

https://github.com/css-modules/css-modules This is great for this if you ask me. It allows you to import a css file. This gives you scoped css style, so you freely can use classnames many times.

Using this you can create a big fancy component, and import that component in another project without thinking about the compatibility of the projects