Skip to content

React-in-Thai/useRef-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React useRef Examples

📹 Live topics

  • Understanding about react hook (synchronization instead of lifeycle)
  • What is useRef?
  • Why we need useRef?
    • persist value on every render (mutable state)
    • want to store value without notifying react to rerender
  • Use cases of useRef?
    • store DOM to access methods like input focus
    • store handler or callback

Examples

  • Email subscribe form
  • Previous state
  • Interval hook
  • Event listener

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published