Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 728 Bytes

README.md

File metadata and controls

16 lines (13 loc) · 728 Bytes

useRef

useRef() allows access to DOM elements and retains mutable values like input without re-renders.
Used with the ref attribute for direct DOM interactions.
Can hold previous state or prop values.
Not limited to DOM references, can hold any value.
Also, Refs can be passed as props.

Note: In JavaScript, Array does not have any type, a single array can contain String, number, boolean, number, & method at the same time JS.

Spread Operator

It spreads the current array. Creating an array using an existing array and adding more elements to it sequentially. It is used to maintain immutability when updating arrays or objects.

React JS

In real project, react authomatically works in async format