Skip to content

AqibNiazi/tic_tac_toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎯 Tic-Tac-Toe with React

A Tic-Tac-Toe game built with React, focusing on core React concepts such as state management, derived states, and component-based architecture.

🚀 Features

  • 🏆 Two-Player Game: Players take turns marking the grid.
  • 🔄 Dynamic Game Board: Updates based on player moves.
  • 🏁 Win Detection: Determines the winner based on predefined winning combinations.
  • 🔄 Restart Game: Resets the board to play again.
  • 📝 Change Player Names: Players can customize their names.

📚 Concepts Practiced

  • 🎯 Lifting State Up – Managed shared state across components.
  • 🔍 Derived State – Computed values like active player and winner without redundant state.
  • 🎛 Multiple State Values – Used separate state variables for players, game turns, and UI updates.
  • ⚛️ Component vs. Normal Functions – Structured logic cleanly between components and utility functions.
  • 📦 Arrays & Objects in State – Managed game turns, board state, and player data effectively.
  • 📋 Nested Lists – Rendered dynamic game board and turn logs efficiently.

🛠 Tech Stack

  • 💻 Frontend: React (useState), JavaScript
  • 🎨 Styling: CSS

🚀 Getting Started

1️⃣ Clone the repository

git clone https://github.com/AqibNiazi/tic_tac_toe.git
cd tic-tac-toe-react

2️⃣ Install dependencies

npm install

3️⃣ Start the development server

npm run dev

📂 Attachments

Project Dashboard

About

Tic-Tac-Toe game built with React, focusing on lifting state up, derived state, multiple state values, and component-based architecture. The project demonstrates efficient state management using arrays, objects, and nested lists.**

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors