title: How to avoid websocket clients duplicated using vuejs
body: <p>When I access to a component, it runs socket.on.<br>
  And there is a button component in Vuejs as below.
  So when I emit to socket.on('voice') of nodejs, the nodejs socket emits to 'socket.on('reply').<br>
  Thus, console.log(msg) worsk well.</p>
  
  <pre><code>&lt;button @click="start()"&gt;Click&lt;/button&gt;
  
  methods:{
     start(){
         socket.emit('voice',{data:'hey'})
     }
  created(){
         socket.on('reply', msg =&gt; console.log(msg))
  </code></pre>
  
  <p>But the problem is when I move to another url and back to this component, 'socket.on('reply') runs again.<br>
  Therefore there are two websocket clients here.<br>
  how can I solve this problem? Thank you so much for reading this.</p>