0

The index html file can display text upon testing but react components are not showing any data. All react projects were working perfectly before today. Thanks.

1 Answers1

0

Can you provide more details on how the index file looks? Also, do you mean index.html or idex.js?

As far as I understand, a react project must have an index.js file, which should have the below code by default, unless you have changed it.

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';

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