You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useEffect(() => {
// Simulate data fetching
setTimeout(() => {
// Here you would fetch your data from an API
setData("Hello, this is your data!");
setLoading(false);
}, 2000); // Simulate a 2-second load time
}, []);
if (loading) {
return <Loading />;
}
return (
<div className="App">
<h1>Data Loaded</h1>
<p>{data}</p>
</div>
);
There isn't loading component when the page is rendered.
The text was updated successfully, but these errors were encountered: