创建 React JS 项目

DEV Community DEV Community ·

首先,确保安装 Node.js 和 npm。使用 Create React App 创建 React 项目:运行 `npx create-react-app my-app`,然后进入项目目录。使用 `npm start` 启动开发服务器,浏览器会打开 http://localhost:3000。编辑 `src/App.js` 文件。准备部署时,运行 `npm run build` 生成生产版本。

原文英文,约300词,阅读约需1分钟。
阅读原文