Eszett explicit scopes for styling react components
Eszett explicit scopes for styling react components
Hello HN :-) I built "eszett" a small plugin to help manage scoped CSS in React, especially with server components in mind. It’s heavily inspired by styled-jsx. It always bugged my that I can not access the class names, that styled-jsx generates, in my code. So the core idea is simple: eszett generates a unique class name for each component (like styled-jsx) but then lets you access those class names and you have to scope your styles manually. I thought giving access to the class names is all I need for a complete plugin, but using it I really missed the automatic rewriting of the class names, so I added that. Maybe at a later stage I will also update this to rewrite the css too. I built this with swc just to get a chance to play around with rust. This still needs a lot more tests, and also I would like for it to be compatibe with more than just the latest nextjs. But I’d love to get some feedback on how it could be improved and if this concept only makes sense to me or also to others :-)
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
Searchkit – React components for elasticsearch
nymus - Tranform i18n strings to React components
Codegen Components in React, Vue, Angular, Django etc.
Call your React components [lib]
React-frontload – async data loading for React components
AI for React Components - hydra-ai
Generate React components by replicating your own
Make stateless functional React components hoverable
Relaks 2.0 – Asynchronous operation in hook-based React components
Custom :pseudo-selectors for React Components