
Set up a React TypeScript Connect Four project by installing NodeJS, VSCode, and width, installing dependencies, and launching the dev server; define rows, columns, colors, and constants.
Build a six by seven board component in React, rendering a six by seven tile grid, styled with CSS grid, using a clip SVG to create holes for dropping pieces.
Implement the drop zone above the board, track dropped marbles with a typed state, and render them positioned by x and y using absolute transforms and the current player's color.
Build an active marble component that receives the turn and moves left or right in the drop zone using arrow keys, with column state and useEffect handling keyup events.
Implement marble dropping in a React game by handling space or enter, calculating column height from dropped marbles, updating the drop zone, and toggling turns.
Animate the dropping marble and its movement in a React game using transform translate, row state, and a 500 ms CSS transition for the drop zone.
Implement winner logic by defining win types and player numbers, checking horizontal, vertical, and diagonal directions, and resetting the game with a winner component.
Set up a React + TypeScript hangman project, install dependencies, and run the boilerplate to begin coding; next, install the Jest test suite.
Install and configure testing libraries for a React and TypeScript project, set up Jest with tsconfig and setup files, and run tests before starting the dev server.
Develop a hangman game in React TypeScript, define animal word list in constants, implement random word selection via a helper, reset on mount, and add tests with Jest.
Mask the target word into underscores, render the hangman-style interface, and present an interactive alphabet as clickable buttons with centered, styled display.
Implement a letter-guessing mechanic for a hangman game using React and TypeScript, tracking correct and incorrect guesses, handling on-guess logic, and disabling already guessed letters with accessible styling.
Check that every letter of the word is in the correct guesses to win, and end game after ten wrong guesses using a useEffect that updates on word or guesses.
Learn to implement hangman in React by showing parts on wrong guesses, revealing correct letters in a masked word, and rendering svg hangman progress with a fail-count logic.
Build and integrate a win/lose pop-up for a React hangman game that handles game reset, displays win or lose status, and supports replay after success or failure.
set up a 15 puzzle game project with ReactJS, TypeScript, and Jest; install dependencies, configure tsconfig and package.json, and run tests with V8 as the dev server.
Initialize a 4x4 game board, import and render the board component, and implement a shuffle function that creates 16 tiles numbered 1-16, with tests ensuring no zero and correct length.
Render a tile for each number with its index, map to a tile object, and animate moves to reveal wins, while styling absolute-positioned tiles for a responsive grid.
Implement an overlay layer as a separator atop the tiles by rendering 16 overlay cells with 10px borders. Disable pointer events and use z-index to stack overlays above the tiles.
Implement a move tile mechanic on the board by swapping the clicked tile with an adjacent tile, using index checks to ensure valid moves and updating the tiles accordingly.
animate the tiles with smooth left and top transitions using style.css, set a 0.4s ease in out, and block rapid clicks by an animating state until the animation finishes.
Handle keyboard events to move tiles with arrow keys. Use useEffect and useCallback to manage keydown listeners, cleanup on unmount, and coordinate tile moves with animations.
Detect the winning condition by checking all tiles match their index, render a winner overlay, and reset the game by shuffling tiles with a reset function for retries.
Implement a game button that resets state, connect a game component with a reset prop, and wire it to the board and winner for restarting play in React and TypeScript.
Build a lights out game in React TypeScript on a configurable grid where a click toggles a light and its neighbors, aiming to turn all lights on or off.
Implement a two-tone title component in a React app, styling orange and blue spans with a flicker animation and keyframes to create an eye-catching header.
Create a five by five grid board in react typescript, implement a grid generator that toggles a cell and its neighbors to produce a solvable lights-out grid, test with jest.
Render a two-dimensional number grid from state by mapping rows and cells in portal tsx, using unique keys for each cell and styling the board for a centered layout.
Create a cell component to separate board and cells. The cell receives row index, column index, and a boolean status, and renders an on or off circle with CSS.
toggle the lights on a grid by clicking a cell, flipping that cell and its four neighbors, using a copied board state and a use callback to optimize rendering.
Detects game completion by checking all board cells are off or on, sets a game over state, and conditionally renders the board while styling the winning 'one' state with css.
To install and config Jest and dependencies,
1- run this command on your terminal
npm install -D jest @testing-library/react ts-jest @types/jest ts-node @testing-library/jest-dom jest-environment-jsdom @testing-library/user-event
2-Create a file named: jest.setup.ts in your project folder with this content:
import "@testing-library/jest-dom";
3-Create a file named: jest.config.js with this content:
export default {
testEnvironment: "jsdom",
transform: {
"^.+\\.tsx?$": "ts-jest",
},
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
};
4-Open tsconfig.json and add replace everything with:
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.node.json"
}
],
"compilerOptions": {
"esModuleInterop": true,
}
}
5-Go to package.json and under scripts
Replace the line starting with “dev” with these two lines
"dev": "npm run test && vite",
"test": "jest --passWithNoTests",
Images
The whole images set used for this lesson can be found in the FreePik website. Please visit external link for this video
Create a centered React and TypeScript card grid with front and back faces that flip on the y-axis, componentize each card, and use a four-by-four layout with 15px gaps.
Learn to implement a card matching game in React by wiring click handlers, tracking first and second cards, revealing matches, and resetting state for non-matches.
Reveal cards on mismatch, reset after a timeout, and manage reveals using a boolean is revealed prop to show two cards at a time, while disabling extra clicks until reset.
Track and display the turn in a React memory game, updating it on card reveal and resetting to zero with an init game, plus a new game control.
Set up a React and TypeScript project for mastermind, configure Jest and testing libraries, wire Redux and context for data flow, and bootstrap the app scaffolding for development.
Implement the mastermind app's four components: secret, rows, colors, and buttons, with a centered 600px board, CSS grid layouts, and an ubuntu font.
Define a color options constant and map them to color circles in a React TypeScript app, wiring CSS classes and a wrapper item to handle borders.
Build a row with an index, circles for guesses, and hints; make circle colors optional and default to transparent, and tune flex layout with space-around and a transparent rgba color.
Define a reducer and context to share state across components, dispatch actions to update the current color and rows, and provide state and dispatch via React context.
Define the game state type and an init game state helper that sets current row, current color, 2D rows, hints, a new secret from color options, and an ongoing state.
Highlight the active row and active color by reading current row and current color from app state via app context, applying an active class and css border.
Set the active color by dispatching a set color action through the context API, defining action types and payloads, and wiring circle clicks to update the reducer state.
Implement a set slot action and reducer to color a clicked slot using the column number as payload, update the current row, and dispatch via the context API.
Implement row checking in a mastermind-like game by rendering colored circles, enabling the check button when four colors exist, and computing hints by comparing the guess to the secret.
Write and run test suites for the color feedback function, defining get hints and validating cases with blacks, whites, repeats, and empty results for secret and row color combinations.
Detects game end by monitoring current row changes with a useEffect, evaluating hints to determine win, loss, or ongoing states via a checkGameState helper and dispatching a setGameState action.
Implement end-of-game rendering and reveal the secret using a GameEnds component and app context. Manage new game logic with actions and a reducer to reset state and start fresh rounds.
Set up a React with TypeScript and Jest project to build a Wordle-like five-letter word game, implementing yellow and green feedback, configuring package.json and tsconfig.json, and launching the dev server.
Select a random word from a predefined list, implement a helper to pick it, write tests, and wire the result to state with useEffect for a new word.
Build a six-by-five word board in React with TypeScript, rendering six rows of five letter slots that capture user guesses via state and drive a reusable board component.
Build a three-row keyboard in React with TypeScript, rendering enter and delete. Add keydown handling in App.tsx with useCallback and useEffect, and clean up the listener.
Handle key strokes in a React word game by reading keyboard events, normalizing to uppercase, enforcing a five-letter limit, and updating the word with backspace and enter to advance rows.
Develop a Wordle-style guessing board in react with typescript, coloring correct green and semi correct orange, using a solution prop and jest tests for duplicates.
Color keyboard letters in a React TypeScript game using the solution and guesses to show green, yellow, or wrong; implement a merge function to track typed letters and add tests.
Wire the keyboard component to the app.tsx onkeydown handler, handle letter keys, enter, and backspace as strings or keyboard events, and style active keys for visible feedback.
Detects end of the game by comparing the guess to the solution using useEffect and a game status enum, then opens a modal with win or loss and play again.
Unlock the full potential of React with this comprehensive, hands-on course where you’ll master modern web development by building seven classic games. This course is perfect for developers with a basic understanding of React, TypeScript, and CSS, looking to elevate their skills through practical, engaging projects.
Throughout the course, you'll create a variety of well-known games including Connect 4, Wordle, Master Mind, Memory Game, Lights Out, Hangman, and the 15 Puzzle. Each project is designed to deepen your understanding of React’s core concepts, such as components, hooks, and state management, while also introducing you to advanced techniques like Context API and Redux for effective state handling.
You’ll also learn how to write unit tests using Jest to ensure your applications function as intended. You will also learn more about code-splitting and separation of concerns in web applications.
Whether you’re an aspiring web developer or a seasoned programmer looking to refine your skills, this course provides detailed explanations and hands-on experience to help you build interactive, high-performance applications. By the end of the course, you'll not only have a portfolio of classic games but also a solid foundation in both React and TypeScript, ready to tackle more complex projects and advance your career in web development.