React JS 19 Tutorial in Hindi #35 Style with CSS Modules
- Why need css module
- Make css module file
- Write module css
- Import css in component
- Interview Question
CSS Modules in React are used to solve a common problem in frontend development: CSS class name collisions and global scope pollution. Here's why you might want to use CSS Modules in a React project:
.heading{
color: red;
}
.img {
width: 200px;
}
.card{
border: 1px solid #ddd;
width: 200px;
margin: 10px;
box-shadow: 1px 1px 3px 1px #ddddddb8;
}
.textWrap{
padding: 10px;
}