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

214
Views
React doesn't update when CSS File is changed

So I'm new to React. I want to style a simple text and found out how to use styles, but when I want to change something in the CSS I have to restart my React App which always takes 3 Minutes.

I use npm start to start the React server that was created with create-react-app.

How can I let React update when the CSS file is changed?


I have an index.js that looks like this:

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import App from  './Frontend/App.js';
import './Frontend/style/main.css';

ReactDOM.render(<App/>, document.getElementById('root'));

And an App.js that looks like this:

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import './style/main.css';

class App extends Component {
    render() {
        var pageHeading = (
            <h1 className="pageHeading">bosleeir.it</h1>);
        return pageHeading;
    }
}

export default App;
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Remember that you need to import your CSS in your component. I wouldn't recommend to do it on index.js

I'm assuming your folder structure is:

enter image description here

which could lead me that:

  1. You're using an older version of React
  2. You have modified the structure of your files

So double-check if the path are configured correctly.

about 4 years ago · Santiago Gelvez 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!