React 应用开发指南

本指南介绍如何使用 Create React App 创建和运行 React 应用程序。

### 项目启动

在项目目录中,您可以运行以下命令:

  • yarn start: 在开发模式下运行应用程序,并在浏览器中打开 http://localhost:3000/ 进行访问。代码编辑后页面会自动重新加载,控制台会显示错误信息。

  • yarn test: 启动交互式测试运行程序。

  • yarn build: 构建生产环境可用的应用程序,并将结果输出到 build 文件夹。

  • yarn eject: 注意: 此操作不可逆!如果您对默认构建工具和配置不满意,可以使用此命令移除项目对 Create React App 的依赖,以便进行自定义配置。

### 命令详解

  • yarn start: 用于开发环境,支持热更新和错误提示。

  • yarn test: 用于运行测试用例,确保代码质量。

  • yarn build: 用于构建生产环境代码,优化性能并压缩代码体积。

  • yarn eject: 移除 Create React App 的默认配置,以便进行自定义配置,但此操作不可逆。

zip
Giphy-App-main.zip 预估大小:22个文件
folder
Giphy-App-main 文件夹
file
.gitignore 310B
file
package.json 811B
folder
src 文件夹
folder
components 文件夹
file
GiphyList.js 1KB
file
Search.js 946B
file
Giphys.js 343B
file
Loading.js 353B
folder
services 文件夹
file
getGiphys.js 412B
file
index.js 158B
folder
css 文件夹
file
imgRow.css 133B
file
loadin.css 3KB
file
search.css 299B
file
img.css 99B
file
App.js 504B
file
App.css 564B
folder
public 文件夹
file
robots.txt 67B
file
logo192.png 5KB
file
index.html 2KB
file
favicon.ico 4KB
file
manifest.json 492B
file
logo512.png 9KB
file
README.md 3KB
file
yarn.lock 492KB
zip 文件大小:215.73KB