Es

Eszett explicit scopes for styling react components

Hacker News

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 card

Actual performance

2points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
93%93% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: using, code · Missing: mac, agents, macos
54%54% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
AppSumoStrong fit for a featured deal · Missing: plus, platform, intuitive
52%52% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
33%33% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide · Missing: https docs, excited, just released
27%27% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
15%15% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Se
Searchkit – React components for elasticsearch68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Searchkit – React components for elasticsearch

Hacker News74
ny
nymus - Tranform i18n strings to React components40%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

nymus - Tranform i18n strings to React components

Hacker News1
Co
Codegen Components in React, Vue, Angular, Django etc.41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Codegen Components in React, Vue, Angular, Django etc.

Hacker News2
Ca
Call your React components [lib]43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Call your React components [lib]

Hacker News1
Re
React-frontload – async data loading for React components51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

React-frontload – async data loading for React components

Hacker News2
AI
AI for React Components - hydra-ai65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AI for React Components - hydra-ai

Hacker News5
Ge
Generate React components by replicating your own53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Generate React components by replicating your own

Hacker News38
Ma
Make stateless functional React components hoverable58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Make stateless functional React components hoverable

Hacker News1
Re
Relaks 2.0 – Asynchronous operation in hook-based React components49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Relaks 2.0 – Asynchronous operation in hook-based React components

Hacker News1
Cu
Custom :pseudo-selectors for React Components51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Custom :pseudo-selectors for React Components

Hacker News2