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

152
Vistas
Why is not the react style being removed when the component is unmounted?

I have 2 pages:

  • Home (React Class Component)
  • CreatePost (React Functional Component)

Both of them have a style class with the same name '.Grid'.

When I'm in the CreatePost page and go to the Home page then the Home Page keep the .Grid from the CreatePost page.

Should not the styles be removed when the React functional component is unmounted (when I exited the page)?

I'm importing the styles like 'import ./Home.css' and 'import ./CreatePost.css'

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

0

React won't remove the CSS you import, since it is not React component. You can consider using styled-component.

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