Tom
Tom

Reputation: 100

Separate jss vs with-component-jss

I am working with react and material-ui, using jss for styling.The project is getting bigger and i want to organize the jss. Every component has it's own separate jss with in the component file.

What i can't decide is should i put the jss code of a component(say button):

Can separating the jss bring any issues,especially if the project involves more than one developer?

Upvotes: 0

Views: 98

Answers (1)

Andres9619
Andres9619

Reputation: 194

What I have learned from working with large codebases is that is better to separate your styles from your logic, like you do with css and JavaScript. You separate your concerns and it's more maintainable.

So when you are working with multiple developers should be less probable to conflict if one it's doing some styling and the other creating some logic.

Upvotes: 1

Related Questions