Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!