useRef - 특정 DOM 선택 javascript에서 특정 Dom을 선택하는 역할을 하는 getElementById, querySelector와 같다. 원하는 위치에 ref={} 의 형태로 작성하면 된다. 포커스를 잡으려면 nameInput.current.focus() 형태로 작성하면 된다. 전에 만든 InputSample.js 에서 이름과 닉네임을 초기화하면 이름 input에 포커스가 가도록 설계해봅시다. // InputSample.js import React, { useState, useRef} from 'react'; function InputSample() { const [inputs, setInputs] = useState({ name: '', nickname: '', }); const na..