-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace runtime with emotion.js #57
Comments
I came here looking for any issues about performance, since a tool I'm using makes heavy use of dynamic styles and I noticed Replacing cljss with emotion for a single heavily-used dynamic style (that often had to change at least 15 instances on a repaint) took my repaint times from 175ms to 13ms. |
@mattly Would you mind sharing how you're using emotion in your cljs project? Are you using the "vanilla" emotion package, or |
I've used the one which is published to cljsjs, guess it's vanilla. The only issue with js lib is that it won't work with SSR on JVM |
I was just wondering if it needed to be used a certain way to take advantage of the performance benefits, but it doesn't seem like For example I was surprised to see it wasn't using CSS variables, since I figured swapping out css vars would be more performant than generating entirely new classes each time a prop changes. |
I'm using it from npm under shadow-cljs. I replaced my cljss |
FYI, I created a tiny wrapper for emotion https://github.com/khmelevskii/emotion-cljs and maybe it can be useful |
CSS-in-JS libraries in JavaScript world are mature enough already so it makes little sense to ignore them. I'd propose to replace library runtime with existing JS library, like Emotion, and make cljss essentially a thin wrapper on top of JS library.
The text was updated successfully, but these errors were encountered: