import { useState, useEffect, useDebugValue } from 'react';
import './App.css';

function useName(): string {
  const [name, setName] = useState('');
  useDebugValue(`Name is ${name}`);
  useEffect(() => {
    setTimeout(() => {
      setName('React');
    }, 5000);
  });

  return name;
}

const App: React.FC = () => {
  const name = useName();

  return <div>{name}</div>;
};
export default App;

