
What is a component and how to break down our game into components?
In this lesson, we jump straight into it and create our first components.
Note: If you are having problems with the settings: New versions of React and React DOM come out together, but it can happen that the website providing these libraries for CodePen is not up to date with both of them. If for some reason the version number of React and the version number of React DOM do not match then you have to downgrade the one with the higher version number by simply changing the number in the url of the added library to match.
In this lesson, we put our square components in place and add some CSS to make it look like a grid.
How to pass on a prop to a child component?
How to use data and what's the general structure of component-based applications?
Our first attempt to make our game data-driven.
Fixing our state with React hooks and exploring how re-rendering works.
In this easter egg lesson, we code some simple images for our game.
Handling events and adding callbacks.
We add some application logic to detect the winner. This is a purely JavaScript chapter, but it is necessary to make our game work.
Putting the final pieces together.
Congratulations! Now you have a Tic Tac Toe game, and hopefully, you also have a much better understanding of how React works. If you have any question please don't hesitate to reach out to me. You can also find me on Twitter at @HunorBorbely
Do you want to learn React the fun way? In this class, you will learn the key concepts of React while building a Tic Tac Toe game.
React is currently the most popular front-end library. It's easy to begin with yet it's very capable even for building large-scale professional web-applications. In this course, we learn the fundamentals of React while having some fun and creating a Tic Tac Toe game.
While building a game we dive into the fundamentals of React like:
How to break down your application or game into smaller pieces, into components?
How to structure your logic and how to connect these components with props and callbacks?
How to deal with change, what is the state, what to store in it, and where to define it?
How to add interaction and how does re-rendering work in React?
And while it has nothing to do with React we are also going to draw some basic images by coding SVGs
This is an introductory course for beginners. We don't get to more advanced things like routing or state management of large-scale applications. Instead, I give you a foundation you can build on.
Requirements:
This is an intro course, no prior React knowledge is required, but some HTML, CSS, and basic Javascript skills are necessary.