Even though when I am using 'export default App;' there is still an error saying './App does not contain a default export (imported as 'App').' in Index.js file. The error is solved when i change the name of the file.
this is the code in App.jsx file
import React, { useState } from 'react';
import data from './data';
import Card from './Card'
import Heading from './Heading';
const App = () => {
const state = useState();
return (
<>
<Heading />
<div className="cards">
{data.map((value, index) => {
<Card
cardimg={value.simg}
cardname={value.sname}
cardtitle={value.stitle}
cardlink={value.links}
/>
})
}
</div>
</>
);
}
export default App;
and this is the code in index.js file :
import React from 'react';
import ReactDom from 'react-dom';
import './index.css';
import App from './App';
ReactDom.render(
<App/>
,document.getElementById('root')
);