In the context of a react web app, what are features available in css/scss/sass which one cannot get from using pure javascript objects?
So far I could only come up with these features:
- Factoring out styles so they don't mix with the logic. This can still be achieved by having a javascript file dedicated to styling and importing it.
- Style composition. Can still be achieved using the
spread (
...
) operator. Safety can be achieved using immutable objects. - Using selectors to apply design. This is just a poor man's pointer imo. If you can apply the styling directly using variables, you can achieve the same outcome without any extra boilerplate, and less syntax.
Asking to understand which way to go in a given project.
EDIT: I've highlighted the question, this is not a subjective discussion, but a request for a features list that is found in these frameworks and does not exist in pure js.