React小游戏项目模板

React 的小游戏项目模板,结构清晰、脚本也都配好了,拿来就能用,省事不少。

项目目录下直接跑npm start,开发环境自动起服务,浏览器秒开,改点代码还能自动刷新,响应也挺快。

需要跑测试?敲npm test就行,交互式的监视模式,用起来蛮舒服。想要上线?用npm run build打包,输出的内容带哈希、已压缩,直接部署也行。

如果你对脚手架配置有要求,npm run eject可以把底层配置都放出来,像webpackBabelESLint这些,爱咋调咋调。但注意,一旦 eject 了就回不去了

另外这几个文章也挺有参考价值的:效率神器:npm run startreact-test-appReact+Webpack 入门教程。刚上手 React 或者想搞个轻量项目练手的,可以看看。

如果你正在折腾React或者打算构建自己的组件系统,这项目挺合适,轻量好改,脚手架也靠谱。

zip
game_project-master.zip 预估大小:22个文件
folder
game_project-master 文件夹
folder
public 文件夹
file
manifest.json 492B
file
index.html 2KB
file
robots.txt 67B
folder
src 文件夹
folder
Pong 文件夹
file
constants.js 577B
file
update.js 3KB
file
collision.js 219B
file
render.js 5KB
folder
Components 文件夹
folder
Body 文件夹
file
Games.jsx 361B
file
style.js 719B
file
Pong.jsx 23KB
file
Single.jsx 169B
file
Banner.jsx 3KB
file
App.jsx 380B
file
index.css 522B
file
setupTests.js 255B
file
serviceWorker.js 5KB
file
index.js 613B
folder
Views 文件夹
file
home.jsx 231B
file
README.md 3KB
file
.gitignore 310B
file
package-lock.json 607KB
file
package.json 1KB
zip 文件大小:169.58KB