Created
October 31, 2017 00:20
-
-
Save AntonioErdeljac/91cdfd99c187c7ef11c0fb12467f8122 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import io from "socket.io-client"; | |
class Chat extends React.Component{ | |
constructor(props){ | |
super(props); | |
this.state = { | |
username: '', | |
message: '', | |
messages: [] | |
}; | |
this.socket = io('localhost:8080'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment