Description
Expected behavior:
the class name suffix should be unique (by the counter increment).

Describe the bug: I created 2 simple react component, called ChildComponent & ParentComponent. The ParentComponent renders the ChildComponent dynamically based on the states or props or both. When the parent render the child, the child class name is exactly the same as the parent, thus make collision - the parent style overwrites the child.
Reproduction:
see this sandbox: https://codesandbox.io/s/create-react-app-forked-go82n?file=/src/App.jsx
then check the checkbox to show the component, then open dev tool, find the generated css.
Versions (please complete the following information):
- react-jss: 10.5.1
- Browser: chrome
- OS : windows
Feel free to add any additional versions which you may think are relevant to the bug.
Managing expectations:
Maintainers will not be fixing the problem you have unless they have it too, if you want it to get fixed:
- Submit a PR with a failing test
- Discuss a solution
- Implement it
You can also do the first step only and wait for someone else to work on a fix. Anything is much better than nothing.