Create a Chess Game with ReactJS - Part 10: Refactoring
In this part we are going to refactor the code!
The code in this video can be found on this GitHub repository:
Timestamps:
0:00 Introduction
0:42 Creating constants file
1:05 Horizontal and vertical axis
1:57 Piece interface
2:05 TeamType and PieceType
2:52 InitialBoardState
5:50 Creating position interface
6:46 Replace x and y with position
9:30 Replacing GridX and GridY with position
10:25 Fixing the references
13:50 Creating grid size variable
14:45 Caps locking constants
15:10 Fixing the references
15:40 Replacing forEach with find function
16:37 DropPiece function
18:25 Talking about Redux
20:30 Creating same position function
21:20 Using the function
23:35 Referee use positions
24:20 Updating the statements
26:58 Updating en passant check
27:35 Function start with small letter
3 views
0
0
1 month ago 00:08:10 1
AI Agents Will Create MILLIONAIRES in 2025 – Are You Ready
1 month ago 00:04:49 1
Play To Earn🔥This New Play to Earn Game is About to Make a Lot of People RICH
1 month ago 00:02:01 1
Mission: Impossible – The Final Reckoning | Teaser Trailer (2025 Movie) - Tom Cruise
2 months ago 00:06:21 1
Richie Sambora Deep Purple cover When A Blind Man Cries LG — «Momentos»
2 months ago 00:01:00 1
Big Fails 😂😂😂
2 months ago 01:21:24 1
The Dark Exploitation of La Toya Jackson | Full Documentary (4K 2160p) | the detail.
2 months ago 00:21:40 1
La Toya Jackson On Michael’s Allegations | What Changed Her Mind? | the detail.