• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
LDLX@Y火星
博客园    首页    新随笔    联系   管理    订阅  订阅

初识react

 

 

1.通过 npm 使用 React 使用 create-react-app 快速构建 React 开发环境

cnpm install -g create-react-app

create-react-app test

cd test
npm start

2.然后你可以看到桌面上有一个test文件夹

3.开启项目后,浏览器会自动打开欢迎页面,即http://localhost:3000/

4.然后引入antd UI框架

cnpm install antd -S

5.然后在src下的app.js中添加

注意,还需要在src/app.css中引入

6.然后重启你的项目,你会看到如图效果,说明antd框架引入成功

 

 

至此,react项目的搭建以及引入antd框架基本完成

posted @ 2018-03-03 05:18  火星黑洞  阅读(285)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3