What Tic Tac Toe Taught Me

Front
Back
Right
Left
Top
Bottom
REACT JS
Sanjeewa%20RupasingheA Journey from Curiosity to Craft

Learning React With a Simple Game

When starting out with React, the first thing many developers notice in the official documentation is the humble Tic Tac Toe game example. At first glance, it might seem out of place—isn’t Tic Tac Toe just a children’s game? Why would such a simple project be recommended for beginners, let alone discussed in detail in comprehensive documentation?

It wasn’t until I revisited this example, after weeks of hands-on learning, that I truly realized its depth and the hidden lessons beneath its apparent simplicity. 1
LESSON
The Second Look

Recognizing the Lesson in Simplicity

After progressing with React, I returned to that Tic Tac Toe tutorial. This time, I understood that every line of code in that example was there for a reason—teaching state management, thinking in components, and designing interactive UIs, precisely as described in the React Docs’ “Thinking in React” approach. 2
This realization sparked a question✨
What if I coded the game myself, from scratch, in React with TypeScript?
PRACTICE
Building the Game Myself

From Theory to Practice

Taking on the project, I made every decision—breaking down the UI, designing the data model, handling user actions, and implementing the game logic. This hands-on, problem-solving approach is echoed by many industry leaders and educators as the fastest route to mastery. 3

Key lessons included:

Explore project snapshots or discuss custom solutions.

AI-POWERED
An Unexpected Mentor

Leveraging AI

Once my implementation was complete, I decided to generate an alternative version using state-of-the-art AI tools. This allowed for a fascinating, side-by-side comparison—a unique chance to see different coding philosophies in practice.

Observing how AI decomposed the problem revealed alternative solutions, coding patterns, and optimizations. The contrasts often highlighted my assumptions and illuminated areas for growth. 4
WHAT
What I Learned by

Comparing Human and AI Code

Directly contrasting the two implementations was one of the most valuable learning experiences. This exercise echoed the wisdom from software engineering literature.

Key insights included:
WHY
The Power in Repetition

Why Tic Tac Toe?

Returning to a foundational exercise is encouraged by industry best practices and research in skill acquisition. Tic Tac Toe is more than a learning toy; it is a “minimal but complete” project, ideal for applying everything from state management to user interaction in a safe, focused environment. 5
Insights for

Students, Professionals, and Business Leaders

By sharing this journey, the message is simple but profound: foundational exercises like Tic Tac Toe can reveal as much to a senior engineer as to a beginner—if only you look below the surface.
Students & Early Career Engineers
Don’t underestimate simple examples; they are curated for depth, not for difficulty.
Professionals
Revisiting fundamentals rapidly exposes gaps in understanding and solidifies thinking.
Business Leaders & Stakeholders
Simple prototypes often reduce complexity, speed up onboarding, and encourage better communication between teams.

There is only one thing more painful than learning from experience, and that is not learning from experience.

Archibald McLeish

Thank You for Spending Your Valuable Time

I truly appreciate you taking the time to read blog. Your valuable time means a lot to me, and I hope you found the content insightful and engaging!
Front
Back
Right
Left
Top
Bottom
FAQ's

Frequently Asked Questions

Tic Tac Toe is used because it illustrates key patterns in state management, component design, and event handling in a concise and accessible way.

Comparing human and AI-generated code revealed differences in design, clarity, and error handling. The process improved both technical and problem-solving skills.

Absolutely. Revisiting the basics can reveal new insights and strengthen foundational skills.

AI-generated code is fast and creative but often requires review and refinement to meet professional standards.

The official tutorial is here: react.dev/learn/tutorial-tic-tac-toe

  1. Available at : https://react.dev/learn/tutorial-tic-tac-toe
  2. Available at : https://react.dev/learn/thinking-in-react
  3. Available at : https://www.geeksforgeeks.org/reactjs/how-to-build-a-tic-tac-toe-game-using-react-hooks/
  4. Available at : https://conspicuous.com/conspicuous-blog/ai-vs-human-coders-comparative-analysis/
  5. Available at : https://www.markmakesstuff.com/posts/games-react/

Comments are closed