Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

127
Vistas
how do you access bem style selectors dynamically using css modules?

for example I have a following selector in App.module.css file:

.Column--active

and I would like to access this selector from App.js file in React using css modules. First I import all selectors from css file as import styles from './App.module.css', however when I try to apply styles on a given div as following <div className={styles.Column--active}> I get an error at the very spot where I use hyphens -- between Column and Active. I tried wrapping styles.Column--active with backticks and it didn't work. Can someone please help to understand it?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

A possible solution would be:

<div className={styles['Column--active']}>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda