Hi,
I've started a simple react project using create-react-app and then npm install colyseus.js but when I do:
import React, { Component } from 'react';
import Colyseus from 'colyseus.js';
const INITIAL_STATE = {
myTeamId: null,
opponentTeamId: null,
battleState: null,
};
class BattleScreen extends Component {
state = INITIAL_STATE;
constructor() {
super();
this.client = new Colyseus('ws://localhost:2567');
}
render() {
return (
<div></div>
);
}
}
export default BattleScreen;
it yields the following error:
BattleScreen.js:16 Uncaught TypeError: colyseus_js__WEBPACK_IMPORTED_MODULE_1___default.a is not a constructor
any thoughts?