Class name customize API #276
Labels
bug 🐛
Something doesn't work
dx
Related to developers' experience
regression
A bug, but worse
status: waiting for maintainer
These issues haven't been looked at yet by a maintainer
Milestone
Summary
Today, the class names look something like this:
It's far from great DX, especially in dev-mode. It's actually a DX regression compared to emotion/sc. Also to note that emotion/sc were are DX regression compared to JSS.
Instead, I believe that we should get:
-2
or something like-va1
not-1
for variants. There is already a first one, the main one, it's confusing.How do we get the name? Either from the JavaScript variable name, or using some kind of a configurator. For example, sc uses
withConfig({ displayName })
, emotion usesstyled(, { label }
.f1bxvs2e
This should only be done for labels that developers provide and guarantee to be unique in the namespace. So it's important to distinguish two types of labels: a. the ones developers can add without thinking about unicity and b. the ones that are guaranteed to be unique.
The text was updated successfully, but these errors were encountered: