dao-game / react-multiplayer / files / src / app.tsx
Branch react-multiplayer · default branch · all branches
app.tsx
| 1 | import React, { useCallback, useState } from 'react'; |
| 2 | import ReactDOM from 'react-dom'; |
| 3 | import { Game } from './game/game'; |
| 4 | import { App } from './react/App'; |
| 5 | |
| 6 | |
| 7 | const game = new Game('r', 'Red', 'b', 'Blue'); |
| 8 | const app = <App game={game} /> |
| 9 | const root = document.getElementById('root'); |
| 10 | |
| 11 | ReactDOM.render(app, root); |