diff --git a/README.md b/README.md index a80dc73..c53a073 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,16 @@ -# Rsbuild project +# React Tic-Tac-Toe Project + +## 本项目中我学到了: + +1. 使用了 **Bun** 作为 Runtime, 使用了 **Biome** 作为了 Code Linting & Formatting 工具,使用 **rsbuild** 和 **rspack** 作为构建工具和 Bundler。 + +2. 了解了 React 中 **useState** 的作用,知道了状态不可变,所以需要使用 useState 作为钩子创建新的状态。 + +3. 了解了 React 中 状态提升和 Props 向下传递概念,使得代码中子组件尽量简单,只负责展示数据和触发事件,而父组件进行状态管理和逻辑处理以及调用子组件。 + +4. 创建了 **interface** 接口来配合了 TS 中的强类型检查,并进行了复用。 + +5. 了解到了一些 js/ts 中的一部分语法糖。 ## Setup @@ -10,27 +22,20 @@ pnpm install ## Get started -Start the dev server, and the app will be available at [http://localhost:3000](http://localhost:3000). +启动服务器,之后服务会跑在 [http://localhost:3000](http://localhost:3000). ```bash -pnpm dev +bun run dev ``` -Build the app for production: +构建网页: ```bash -pnpm build +bun run build ``` -Preview the production build locally: +在构建前进行预览: ```bash -pnpm preview +bun run preview ``` - -## Learn more - -To learn more about Rsbuild, check out the following resources: - -- [Rsbuild documentation](https://rsbuild.rs) - explore Rsbuild features and APIs. -- [Rsbuild GitHub repository](https://github.com/web-infra-dev/rsbuild) - your feedback and contributions are welcome! diff --git a/src/env.d.ts b/src/env.d.ts deleted file mode 100644 index 698ba8b..0000000 --- a/src/env.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// - -/** - * Imports the SVG file as a React component. - * @requires [@rsbuild/plugin-svgr](https://npmjs.com/package/@rsbuild/plugin-svgr) - */ -declare module '*.svg?react' { - import type React from 'react'; - const ReactComponent: React.FunctionComponent>; - export default ReactComponent; -}