useRef returns a mutable ref object whose
.current property is initialized to the passed argument (
initialValue). The returned object will persist for the full lifetime of the component.
const refContainer = useRef(initialValue);
Keep in mind that
useRef doesn’t notify you when its content changes. Mutating the
.current property doesn’t cause a re-render.
No we’ll not use the focus example :)
Since mutating the .current property doesn’t causes a re-render it can be used…
A socket is one endpoint of a two way communication link between a client and a server which can be used to establish a real-time, bidirectional and event-based communication. In simpler terms a socket can be understood with the analogy of a phone. User A has to initiate communication by dialing to User B. Once the call is received a bidirectional channel is established and real time communication becomes possible.
The craze of texting can be seen in the world, we see people texting anytime and anyplace, these texts connect people to their friends, family and relatives. Leaving social texting or comment texting like on twitter or Facebook, where people are somewhat conscious about what they are putting out in public. The real privacy concerns are your WhatsApp chats, these texts are personal and are to the people you trust and you believe, the text written on top i.e.
“messages to this chat and calls are now secured with end-to-end encryption”
do hold some weight. People may not realise, but…