-
Notifications
You must be signed in to change notification settings - Fork 4
Description
My favorite part about emotion (react-emotion) and styled-components is that you can create the element you want and attach the styles to it in one fell swoop. This is extremely convenient and provides a cleaner syntax, helping new developers to pick up the purpose of a component more quickly and contributes to easier maintainability.
Another feature that sort of goes along with styled API is the template literals. This can be interfaced with ReasonML's multiline/interpolation strings {j| $variable |j}. This string can be sent to the Emotion API and handled there, which brings the syntactic benefits of writing actual css in your ReasonML code, Css-in-Re style.
I am sure you (and many others) have thought of this before. I am guessing that the the reason that it not preferred, is that we want our css to be typed and this prevents that from happening. But it just might be worth it for me to get the better syntax.
Thoughts?