Add Socket.IO client
This commit is contained in:
parent
57768df01a
commit
1e89b629f9
4 changed files with 151 additions and 2 deletions
|
@ -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>
|
||||
);
|
||||
|
|
11
frontend/src/components/SocketIO.tsx
Normal file
11
frontend/src/components/SocketIO.tsx
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue