create-react-app-manually:创建没有任何支架的React应用

时间:2021-05-06 15:36:38
【文件属性】:
文件名称:create-react-app-manually:创建没有任何支架的React应用
文件大小:88KB
文件格式:ZIP
更新时间:2021-05-06 15:36:38
react tutorials parcel-bundler HTML 手动创建React APP 本教程展示了如何在没有任何框架(例如“ create-react-app”)的情况下创建React应用。 步骤0 首先,我们需要安装NodeJs和依赖关系管理工具,本教程推荐使用Yarn 。 例如,使用本地系统软件包安装程序安装NodeJ。 apt install nodejs 然后在全局安装Yarn。 npm install yarn -g 步骤1 使用Yarn为我们生成package.json 。 yarn init 键入所需的所有信息纱线,或完全按Enter。 第2步 由于React使用jsx ,因此我们需要将代码编译为可以在浏览器中运行的普通js。 本教程推荐零配置捆绑程序 。 yarn add parcel-bundler --dev 第三步 将React依赖项添加到项目中 yarn add react react-dom rea
【文件预览】:
create-react-app-manually-master
----.gitignore(31B)
----README.md(3KB)
----public()
--------index.html(175B)
----package.json(415B)
----src()
--------index.jsx(132B)
----yarn.lock(224KB)

网友评论