useRef
in React vs Refs in Vue
- React’s
useRef
is used to create a reference to a DOM element or a value that doesn’t trigger re-renders when changed. - Vue’s
ref
directive also lets you directly access DOM elements or store values that don’t cause reactivity when changed.
Example in Vue:
No comments:
Post a Comment