How To Create A Splash Screen In Our React-App
Jul 1, 2021
To create a splash screen in the react app
First create a new react app open the terminal and type the command
npx create-react-app myapp — use-npm
Open the file App.js and import
import {useState,useEffect} from “react”
And paste this code
const [loading, setLoading] = useState(false);
useEffect(() => {
setLoading(true);
setTimeout(() => {
setLoading(false)
}, 8000);
}, [])
That’s all .