import { useRef } from 'react';
import './App.css';

const App: React.FC = () => {
  const inputRef = useRef<HTMLInputElement>(null);
  function handleClick() {
    console.log(inputRef.current!.value);
  }
  return (
    <div>
      <input type="text" ref={inputRef} />
      <button onClick={handleClick}>ok</button>
    </div>
  );
};

export default App;

