πŸ“šΒ Reference


πŸ“œ Chapter


useState

Class component

Function component

useImperativeHandle

β€£

useRef


const ref = useRef(value)
//ref Object
{current: value}

// μ˜ˆμ‹œ
const ref = useRef("hi")
{current: "hi"}

const ref = useRef("hello")
{current: "hello"}

const ref = useRef("nice")
{current: "nice"}

useRef - μ‚¬μš©, μš©λ„


  1. state와 λΉ„μŠ·ν•˜κ²Œ 값을 μ €μž₯ν•˜λŠ” 곡간이닀.
  1. DOM μš”μ†Œμ— μ ‘κ·Ό