How to nest classes in css modules and react. I think that I just overdid it in my mind. Instead of writing styles.header.menu
I could just write styles.menu, even if it was nested.
1 2 3 4 5 6 7 8 9 10 11 | <div className={styles.header}> <div className={styles.menu}> Whatever </div> </div> .header { .menu { display: block; } } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.