@UnborN there is one issue left with that solution, when reloading the page. Similar to that post, once the page is reloaded, the state of the internal data is gone.
I have tried to use alert('message received: ' + JSON.stringify(this.msg))
inside the this.$socket.on('msg-input:' + this.id, (msg) => {}
event, but there is no msg send when reloading the page. So I wonder how to deal with that usecase?