This is the App.js
import Newhome from './COMPONENTS/Newhome';
import HashLoader from "react-spinners/HashLoader";
import { useState , useEffect } from 'react';
import "./App.css";
function App() {
const [loading, setloading] = useState(false);
useEffect(() => {
setloading(true);
setTimeout(() => {
setloading(false);
}, 1785);
}, [])
return (
<>
{
<>
{
loading ?
<div className="App">
<HashLoader className='loader' color={'#FF5757'} loading={loading}
size={120} />
</div>
: (<Newhome />)
}
</>
}
</>
);
}
export default App;
I am uncertain if the website loads while the spinner is displayed. It seems like the spinner only appears for a few seconds before the complete website loads.
What exactly is happening in this code?
Check out my website here: My website