I'm using Functional components in my react app. I need to delay the content under the return() of my react component by 3 seconds. Here is the way I'm looking for it. Please help me to do it in this way.
import React, { useEffect, useState } from 'react';
const Example = () => {
useEffect(() => {
//some codes
}, []);
//some codes
return (
<div>
{/* Return Something */}
</div>
);
};
export default Example;
datais updated?