react hooks
Learn to create a Tetris game with React Hooks in this course from Thomas Weibenfalk. You will learn how to build Tetris from scratch using hooks like useState, useEffect, useCallback and custom hooks. Styling is done with Styled Components.
从Thomas Weibenfalk的本课程中学习使用React Hooks创建一个俄罗斯方块游戏。 您将学习如何使用诸如useState,useEffect,useCallback和自定义钩子之类的钩子从头开始构建Tetris。 样式是通过样式化组件完成的。
The course covers the following topics:
本课程涵盖以下主题:
- Introduction 介绍
- create-react-app and tooling 创建React应用程序和工具
- Scaffolding Components 脚手架组件
- Stage and Tetrominos 舞台和四肢骨
- Styling with Styled Components 样式化元件的样式
- usePlayer and useStage usePlayer和useStage
- Stage update and player movement 舞台更新和玩家移动
- Collision Detection 碰撞检测
- Player RotationG 球员轮换
- Clear Rows 清除行
- drop with useInterval 与useInterval一起删除
- useGameStatus and React.memo useGameStatus和React.memo
You can watch the full video course on the freeCodeCamp.org YouTube channel (3 hour watch).
您可以在freeCodeCamp.org YouTube频道上观看完整的视频课程(观看3小时)。
翻译自: https://www.freecodecamp.org/news/react-hooks-tetris-game/
react hooks