Add Socket.IO client

This commit is contained in:
aronmal 2022-10-26 00:15:33 +02:00
parent 57768df01a
commit 1e89b629f9
Signed by: aronmal
GPG key ID: 816B7707426FC612
4 changed files with 151 additions and 2 deletions

View file

@ -1,6 +1,7 @@
// import Gamefield from './components/Gamefield';
// import Homepage from './components/Homepage';
import Homepage2 from './components/Homepage2';
// import Homepage2 from './components/Homepage2';
import SocketIO from './components/SocketIO';
import './styles/App.scss';
function App() {
@ -11,7 +12,8 @@ function App() {
<header className="App-header">
{/* <Gamefield/> */}
{/* <Homepage/> */}
<Homepage2/>
{/* <Homepage2/> */}
<SocketIO/>
</header>
</div>
);

View file

@ -0,0 +1,11 @@
import { io } from 'socket.io-client';
function SocketIO() {
// const socket = io("wss://server-domain.com");
const socket = io(); // The server URL will be deduced from the window.location object.
return (
<div>SocketIO</div>
)
}
export default SocketIO