Skip to content

Instantly share code, notes, and snippets.

@AntonioErdeljac
Created October 31, 2017 00:20
Show Gist options
  • Save AntonioErdeljac/91cdfd99c187c7ef11c0fb12467f8122 to your computer and use it in GitHub Desktop.
Save AntonioErdeljac/91cdfd99c187c7ef11c0fb12467f8122 to your computer and use it in GitHub Desktop.
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