Hook : useRef

Jiyun Park
Jan 14, 2021

--

hook series

console
  1. ballRef has been declared by useRef.
  2. get value by ‘current’
  3. change ballRef style in useEffect
  4. (1) if useState, the state change causes re-render

(2) on the other hand, useRef value doesn’t cause re-render when it changes

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet