DEV Community

Discussion on: Create Your Own React Template

Collapse
 
the_riz profile image
Rich Winter

I like your template's idea, but I think you are creating confusion by using/mixing both SASS and styled-components.

Personally, I would want all styling variables handled by styled-components. It is easy to
import { createGlobalStyle }... and define CSS globals there. Then apply them by wrapping the main <App> with a <ThemeProvider> component - See styled-components.com/docs/api#cre...

I don't see you using SASS color manipulation functions, so I'm wondering, other than those, why choose to use SASS at all?

Collapse
 
jimmymcbride profile image
Jimmy McBride

At this point, just for color variables. But I'm really digging what you're putting down. I'm actually refactoring my style library to lean solely on styled-components and factoring out sass. 👍

Why it was in there at all was because the style library I had created was (and is) a baby. It helps you lay out a page really well, but it wasn't that pretty. So I included sass to pretty up everything after it was laid out.