React JS 19 Tutorial in Hindi #35 Style with CSS Modules

  1. Why need css module
  2. Make css module file
  3. Write module css
  4. Import css in component
  5. 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;
}