This is my first time using react and I'm using it with Django. I have an index.js that renders the Component App into an id=root element and in the App's body, I have placed an h1 tag and another Component called HomePage which has been imported. When I first start the server and the webpack, the App component updates normally for about 10 seconds but after that, any changes to the App.js doesn't update. The component HomePage however does update when the App component doesn't. My guess is that main.js isn't updating, any help would be appreciated. index.js
//index.js
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
// import { render } from 'react-dom';
import App from './components/App';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
App.js
import React, { Component } from 'react';
import HomePage from './HomePage';
function App(){
return(
<div>
<HomePage />
<h1>Welcome</h1>
</div>
);
}
export default App;
HomePage.js
import React, { Component } from 'react';
const HomePage = () => {
return (
<div>
<h1>Home </h1>
</div>
);
}
export default HomePage;