码迷,mamicode.com
首页 > 其他好文 > 详细

react 体验[更新中]

时间:2017-11-13 00:15:01      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:file   es2017   tor   image   pie   语法   int   使用   ide   

用了 react 大概半年了,不过我在2016年暑假的时候就看到了 react 这个项目,有点想学习一番,之前学习的都是基础语法和一些基础用法吧,总的来说 mvvm 框架确实都很相似,会一个就可以了;

今天我的配置 react 的时候,搜索过后,发现很多都是一步一步来配置文件的,不过也有好处可以帮助我理解 webpack ,不过这配置也太慢了,如果没存好,还得再来一遍吗?

当然不是,我找到了快速搭建项目的指令:

1.

npm install -g create-react-app

2.

create-react-app [你想要的项目名称]

3.

如果速度太慢的话,可以使用 cnpm;

到这,项目会自动跳出如下提示:

Inside that directory, you can run several commands:

  npm start
    Starts the development server.

  npm run build
    Bundles the app into static files for production.

  npm test
    Starts the test runner.

  npm run eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd grewer
  npm start

基本都很清楚了;

文件结构是这样的:

技术分享

配置到这基本可以了,有点感冒,后面再更

react 体验[更新中]

标签:file   es2017   tor   image   pie   语法   int   使用   ide   

原文地址:http://www.cnblogs.com/Grewer/p/7823427.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!