React Tic-Tac-Toe: Function & hooks implementation

I have been trying to do …something… using React and Three.js (via the react-three-fiber project). I kind of jumped straight into it but keep on getting tripped up by my just not quite ‘getting’ some of the fundamentals of React. So I decided to do the official ‘React-101’ tutorial hoping it might help.

Unfortunately, the official tutorial uses classes (which subclass the React.Component) whereas I have been leaning towards the alternate function/hooks approach to React.

My repo here is the result. Might be useful for someone.


I feel I could as easily code my Three.js heavy app in vanilla javascript (or Typescript). Using React just seems to just add bother.

I am sure the advantages of React are plainly obvious (to someone!) but the cognitive penny still has not dropped with me yet. I will keep going with it purely out of respect for this paragraph from the tutorial:

…er.. Ok Sensai 🥋