Create a Chess Game with ReactJS - Part 1: The board!

preview_player
Показать описание
Hello and welcome to the series on creating a chess game with ReactJS using TypeScript!

In this series we create a chess game from scratch using only ReactJS with TypeScript. Together we walk through the challenges that come with this and we come up with solutions that improve our game.

The programs used in this tutorial:

The chess pieces used in this tutorial can be found on the Frontend Coding GitHub repository:

You can set up the project using the following command:
npx create-react-app chess-app --template typescript

In this first part of the series we start by setting up the project using the command which you can see above here. Then we analyze the chess board and figure out how we are going to implement this.

Then we start coding the component for the chess board. After the chess board we create a tile component which we use inside of the chess board component.

To finish if off we implement a CSS grid for the chess board. We determine the number of columns and rows and which tiles are going to be black and white.

The code in this video can be found on the Frontend Coding GitHub repository:

Timestamps:
0:00 Introduction
0:20 Setting up the project
2:24 Analyzing the board
3:30 Creating the chess board component
8:54 Creating the tiles
16:27 Implementing the grid
Рекомендации по теме
Комментарии
Автор

3:03 "We don't test. Everything works immediately." xD

BobArctor-do
Автор

so thankful to have landed on your channel 🐈

MonikaRabha
Автор

thank you for the video, looking forward for the rest of the series.

talal
Автор

I am learning React JS
Bookmarked this playlist
Will start soon 🔥

Coder_DhruvArora
Автор

This is an amazing series. That I was using as a introduction to react and a project of mine.
However I came accross an issue.
When we accidently drag an empty tile instead of dragging a chess piece.
Then we have a bug in the next move we try. The piece will get stuck with the mouse and not drag properly.
To replicate this bug all you have to do is try to drag an empty tile as if you are dragging a chess piece, AND drag that tile unto a tile that has a chess piece.
And now you will see your chess piece is bugged.
I tried everything to fix this, to no avail.

LastIberianLynx_GameDev
Автор

6:18 maybe chess gets updated so its no more 8x8 haha, nice video btw

sfafsashfdh
Автор

Dope video bruv. Really taught me alot

misfitgems
Автор

Could you explain what happened around the 4:40-4:45 mark? That part confused me. This also gave me a compiling error.

shangarbagio
Автор

Thank you for the video. Easy to understand. But how is it possible to make this project without using mouse. Only keyboard?

TuMann-
Автор

Beautiful video, quick and simple; just one question how would u add chess coordinates such as the lichess boards inside and outside?

beed
Автор

Before I begin, will I be able to then use that to create a chess app?

-_Nuke_-
Автор

Great series! Is it okay if I use some of the logic (in piece movement) for one of my final projects? I’m writing the project in vanilla JavaScript rn but your explanations make the logic very easy to understand :)

jared
Автор

Nice video. Btw of you wanted to add style on the div it's written as <div style={{color: "black"}} />

gabrielseguin