Time to start building cool stuff, let's code our first game!
Create a Tictactoe in React.js just like this one. Remember to follow the recommended workflow to start coding:
- Design your sitemap: How many pages/views?
- Designing your wireframe: What components and where?
- Start coding your components only rendering "Hello world" on each of them (to make sure they work).
- Create a list of all the possible user and system interactions (events) that occure during runtime (for example: The user clicks on a button to start the game)
- Create a javascript functions that will handle each of those events.
Console.log
on each of those funtions to make sure they are being called.- Continue... whatch the video if you have any other doubts.
- State of the components (global variables)
- Props
- Render method
- The function for checking the winner is a great learning algorithm
Here is a video explaining how to do it: https://www.youtube.com/watch?v=MQonrbY8Ezg&list=PLx0T51ydRO_7qabdLlT69keo68WmbXkrB