Server-side issues with Emotion, React -- plans to drop Emotion? #109
PeterEckIII
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, huge fan of the library and the ease of using server-side functions, which is actually why I'm posting. With the React team's opinions on CSS (and specifically CSS-in-JS libraries) changing recently:
And the Emotion maintainer himself expressing concerns he has with runtime CSS, are there any plans to drop Emotion for something more server-friendly like Tailwind?
I have tried several workarounds to get consistent styles for the table to work in Remix, but there are a few hurdles that, at least to me at this time, seem insurmountable without a re-styling of the library. One of which is Remix does not render to a div, but rather renders the entire document. On the first load, the default theme seems to work, but on reloads I lose the styles that were originally injected into the DOM.
I've tried loading the theme on the server as explained here: https://remix.run/docs/en/1.14.3/guides/constraints#md-no-module-side-effects, then passing the theme to the client and loading it into
useTheme
. I've also tried the suggested implementation by Remix here: https://remix.run/docs/en/1.14.3/guides/styling#md-css-in-js-libraries with no success.Would love to continue to use this library and look forward to your response!
Beta Was this translation helpful? Give feedback.
All reactions