DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Discussion on: What CSS approach do you use in NextJS?

Collapse
desmondchoon profile image
Desmond Chin

I often go with CSS in JS, somehow a more productive approach for me. Dealing with just JS, instead of CSS. Besides, the number 1 React UI kit supports it; MaterialUI πŸ˜ƒ.

Collapse
madza profile image
Madza Author • Edited on

I can see where you are coming from, as I still need to find out how to create both component and CSS module file at the same time and get them both linked automatically πŸ˜‰
Doing it manually for now, and it takes quite a time, tho I still stick with CSS modules as they are still native to core CSS, which I currently prefer over CSS-in-JS solutions πŸ˜‰ Might change in the future, tho πŸ˜‰

Collapse
wjkawecki profile image
Wojciech Kawecki • Edited on

I am using plop and have an npm scaffold script, which takes a name of my new component and creates all required files for it: React component file, some sample mock data file, tests file and styles file.

Thread Thread
wjkawecki profile image
Wojciech Kawecki • Edited on

Oh, and also a Storybook story file, which I forgot to mention in prev comment.

Thread Thread
madza profile image
Madza Author

Awesome input! Thanks! πŸ™β€