Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

use state vs use ref

Source: https://stackoverflow.com/a/56456055
The main difference between both is : useState causes re-render, useRef does not.
 
PREVIOUS NEXT
Tagged: #state #ref
ADD COMMENT
Topic
Name
9+3 =