-
-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Dynamic values and class repetition #1588
Comments
Have you found an answer to this yet? |
Nope :/ you dealing with something similar? |
Yea noticed the same thing in one of my personal projects. I've switched to emotionJS for now, they have very similiar syntax if you use object styles. Main reason why I made the switch is it seems like theres a lot more community support and answers. Although you might not be in a situation where you can switch. |
For For And, for some situation, JSS might cause memory leak for another reason #1360 . |
Hello!
I was hoping to clear up something that seems like a bug to me. I was under the impression, that when you had a, say, React component with dynamic values as the button in the docs example: https://cssinjs.org/react-jss/?v=v10.8.2#dynamic-values, that it generated a classname that other instances of the same button with the same dynamic values would reuse.
What I mean by that is that if I have multiple components that use the default prop values, since the css values at the end of the day are the same, it'll just reuse the classname and not generate another one.
If we take the following example based off of the Dynamic Values docs:
and take a look at the generated styles:
I fail to understand why
myButton-d0-0-2-2
,myButton-d1-0-2-3
andmyButton-d2-0-2-4
are all separated out, as well as why.myButton-0-2-1
is empty?Am I misunderstanding some core tenant of
JSS
? How can I reuse the same classname across all my components?Thank you!
The text was updated successfully, but these errors were encountered: