Unique class names #4844
-
Hello, I've been reading the react spectrum code to learn more about UI libraries, so there's a thing I fail to understand how it's done, what library/code is used to achieve that In the code I clearly see (for example): Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is done by CSS Modules during the build process. It creates unique class names that are locally scoped so that you don't have to worry about classes with the same name in different files overwriting each other if they're on the same page. Here are docs on how to use it in Parcel: https://parceljs.org/languages/css/#css-modules |
Beta Was this translation helpful? Give feedback.
This is done by CSS Modules during the build process. It creates unique class names that are locally scoped so that you don't have to worry about classes with the same name in different files overwriting each other if they're on the same page. Here are docs on how to use it in Parcel: https://parceljs.org/languages/css/#css-modules