import React, {useState, useEffect} from 'react'; const App = () => { const [loading, setLoading] = useState(false); useEffect(() => { setLoading(true); setTimeout(() => { setLoading(false); }, 2000); }, []); return( <div> // ... </div> ) } export default App;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter