You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I forked a library and made it work with solid-start, What it does is create Dynamic Component and also the style tag with all the styles inside it, Making it useless because all the styles are duplicated every time you use the styled component
So I thought oh I need to cache the styles, I created a Map<string, boolean> which maps unique hash values to whether a style has been used. The map instantly becomes all true and no component renders styles in development.
The library is based on emotion-solid when using that library, It cleans up styles from head after rendering
Basically there's no way to cache styles at server side. You must render each style once on a single page, I cannot know if the style is has been rendered on the page.
How should I use a CSS in JS library with Solid Start
The text was updated successfully, but these errors were encountered:
wakaztahir
changed the title
Not a single CSS in JS library works perfectly with solid-start
Not a single CSS in JS library works with solid-start
Oct 26, 2023
@ryansolid
I forked a library and made it work with solid-start, What it does is create
Dynamic
Component and also the style tag with all the styles inside it, Making it useless because all the styles are duplicated every time you use the styled componentThis
becomes
So I thought oh I need to cache the styles, I created a
Map<string, boolean>
which maps unique hash values to whether a style has been used. The map instantly becomes all true and no component renders styles in development.The library is based on
emotion-solid
when using that library, It cleans up styles from head after renderinghere https://github.com/Qinetik/anique/blob/main/packages/styled/src/cache.tsx
Basically there's no way to cache styles at server side. You must render each style once on a single page, I cannot know if the style is has been rendered on the page.
This library also doesn't work #36
How should I use a CSS in JS library with Solid Start
The text was updated successfully, but these errors were encountered: