function isTyping1(key, callback) {
  //take typing/roomkey and send to server
  socket.emit('is-typing-line-1', key)

  //client listens for if other user is typing, sends message to user (component)
  socket.on('display-typing-1', function() {
    const message = 'Your partner is typing...'
    return callback(message)
  })
}
//Component passes typing and roomkey to this function
Component passes typing and roomkey to this function
Component passes typing and roomkey to this function
function isTyping1(key, callback) {
  socket.emit('is-typing-line-1', key)
  socket.on('display-typing-1', function() {
    const message = 'Your partner is typing...'
    return callback(message)
  })
}
function isTyping1 ( key , callback ) { socket . emit ( 'is-typing-line-1' , key ) socket . on ( 'display-typing-1' , function ( ) { const message = 'Your partner is typing...' return callback ( message ) } ) }
Component passes typing and roomkey to this function
Component passes typing and roomkey to this function
//take typing/roomkey and send to server //client listens for if other user is typing, sends message to user (component)