I just tried opening up the developers console and typed socket because the variable wasn't encapsulated it emits a whole data about the current connection, so they do use sockets.
Yes your flow is right.
Consider user X is the one who receives notifications.
Now user Y hits like button and you make a web request to your backend updating the DB. Now you need to push to that socket client of the user X and manage that data on the receiving end.
It doesn't matter if your are using Reactjs or something else. You can do this.
You can give this a try socket.io , npm package npmjs.com/package/socket.io
You can even keep open the network tab and watch how hashnode handles this.