前端框架 使用React 开发一个井字棋(1)

这篇博客介绍了如何利用Create React App初始化前端项目,并逐步删除默认源文件,替换为井字棋游戏的代码。首先,通过Create React App创建项目并启动本地服务器,接着在src目录下创建index.css和index.js,分别编写CSS样式和JS逻辑,实现了一个空的井字棋棋盘的展示。参考了React官方教程来指导开发过程。
摘要由CSDN通过智能技术生成
Create React App
:npx create-react-app my-app
:cd my-app
:npm start
:npx create-react-app my-app
npx: 99 安装成功,用时 29.076 秒

Creating a new React app in /Users/lurongming/my-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...


> fsevents@1.2.12 install /Users/lurongming/my-app/node_modules/jest-haste-map/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> fsevents@1.2.12 install /Users/lurongming/my-app/node_modules/watchpack/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> fsevents@1.2.12 install /Users/lurongming/my-app/node_modules/webpack-dev-server/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
  SOLINK_MODULE(target) Release/fse.node

> core-js@2.6.11 postinstall /Users/lurongming/my-app/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.6.4 postinstall /Users/lurongming/my-app/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

+ cra-template@1.0.2
+ react-dom@16.13.0
+ react@16.13.0
+ react-scripts@3.4.0
added 1772 packages from 768 contributors and audited 919205 packages in 283.561s

51 packages are looking for funding
  run `npm fund` for details

found 2 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

Initialized a git repository.

Installing template dependencies using npm...

> core-js-pure@3.6.4 postinstall /Users/lurongming/my-app/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值