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

219
Vistas
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 Respuestas
Responde la pregunta

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 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