-
-
Notifications
You must be signed in to change notification settings - Fork 397
Open
Labels
bugIt went crazy and killed everyone.It went crazy and killed everyone.help wantedimportantThe thing you do when you wake up!The thing you do when you wake up!perf
Description
Expected behavior:
Duplicate styles shouldn't be created.
Describe the bug:
On every component render, in which useStyles prop changes, new duplicate styles are created. I've managed to reproduce the bug in Codesandbox. To see it:
- Open codesandbox link from below
- Inspect red text element and see styles applied
- Click on button few times to cause component re-render
- Inspect some another element on the page and the red text again.
- Notice duplicate styles
The styles are duplicated only for elements styled with css selector. If you check styles on the element with container class, you'll see there is no duplication there.
Codesandbox link:
https://codesandbox.io/s/react-jss-playground-7ftrs?file=/index.js
Versions (please complete the following information):
- jss: 10.1.1
- Browser [e.g. chrome, safari]: any
- OS [e.g. Windows, macOS]: any
vlazh, naripok, gilles-yvetot and seiyabLAKnoKAL and gilles-yvetot
Metadata
Metadata
Assignees
Labels
bugIt went crazy and killed everyone.It went crazy and killed everyone.help wantedimportantThe thing you do when you wake up!The thing you do when you wake up!perf