websocket basic setup FE & BE && working basic game w/ react && webpack & babel config
This commit is contained in:
21
src/Mine/SeekerBundle/Resources/public/js/mine-seeker/app.js
Normal file
21
src/Mine/SeekerBundle/Resources/public/js/mine-seeker/app.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
import GridControl from './grid/grid-control';
|
||||
|
||||
class MineSeeker extends React.Component {
|
||||
// /** after rendering */
|
||||
// componentDidMount() {
|
||||
// this.connection = new WebSocket('ws://127.0.0.1:8080');
|
||||
//
|
||||
// this.connection.onmessage = evt => {
|
||||
// // console.log(evt.data);
|
||||
// };
|
||||
// }
|
||||
|
||||
render() {
|
||||
return (
|
||||
<GridControl ref="gridControl"/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default MineSeeker;
|
||||
Reference in New Issue
Block a user