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.
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.
In real project, react authomatically works in async format