D
D
dan0sss2021-12-17 18:41:52
React
dan0sss, 2021-12-17 18:41:52

Automatic generation of ReactJS classes?

Good evening. I recently started learning ReactJS. If you use className="" to define block classes, then after compiling the application (yarn build:production) these classes are displayed in the source code of the site, and if you use css={`class`} , then after compilation this class is assigned the automatically generated title. The essence of the question: is there a hash somewhere for randomly generating these names? And where can I read more about the work of this automatic generation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2021-12-17
@dan0sss

css={`класс`}looks like emotion css prop .
This is nothing to do with React. This is just a feature of the library that requires special configuration.
`css=xxx` by itself does not work in pure React.
Google towards "react mangle class names".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question