How lylio/tic-tac-toe works
This React app lets a player make moves on a nine-square board, tracks turns and win/draw conditions, and offers a reset. The main game logic and outcome display both live in App.js; reusable components render squares, reset controls, and the footer. The entry point mounts the app and calls the optional performance reporter. The graph follows the shown imports and callbacks; no server or persistent game storage is documented.
Main entry points: App.js Game state and rules · Square.jsx Board square · index.js React entry · Button.jsx New game button
Components 9
App runtime
- React entry
src/index.js - Performance reporter
src/reportWebVitals.js
Game experience
- Game state and rules
src/App.js - Win and draw display
src/App.js
Shared components
- Board square
src/components/Square.jsx - New game button
src/components/Button.jsx - Footer
src/components/Footer.jsx
Other components
- Player
- Framer Motion
Connections 11
- React entry → Game state and rules: mounts
src/index.js - React entry → Performance reporter: calls
src/index.js - Player → Board square: plays
- Game state and rules → Board square: renders
src/App.js - Board square → Game state and rules: submits move
src/components/Square.jsx - Game state and rules → New game button: renders
src/App.js - New game button → Game state and rules: resets
src/components/Button.jsx - Game state and rules → Win and draw display: shows result
src/App.js - Game state and rules → Footer: renders
src/App.js - Game state and rules → Framer Motion: uses animations
src/App.js - Board square → Framer Motion: uses animations
src/components/Square.jsx