In this post we’ll cover what the useRef Hook is, what we can use it for and some advice for using it.

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.

Keep in mind that useRef doesn’t notify you when its content changes. Mutating the .current property doesn’t cause a re-render.

Uses of useRef hook

  1. To manipulate DOM elements

No we’ll not use the focus example :)

Since mutating the .current property doesn’t causes a re-render it can be used…


What is a socket?

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.

Photo by Jim Reardan on Unsplash

What is a WebSocket?

WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection.The …


Photo by Jamie Street on Unsplash

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…

Ashutosh Mishra

Developer and Tech Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store