react小白學(xué)習(xí)快速上手

第一步:安裝node.js 下載鏈接https://nodejs.org/en/
如何查看是否安裝成功:黑窗口(命令行)中輸入:node -v 
圖片.png
第二步:安裝tnpm這個(gè)是國外的網(wǎng)站下載jar比較快:
在黑窗口(命令行)中輸入:npm install tnpm -g --registry=http://registry.npm.alibaba-inc.com
第三步:安裝 dva-cli鏈接
通過 npm 安裝 dva-cli 并確保版本是 0.7.0
 或以上。
$ npm install dva-cli -g$ dva -v0.7.0
第四步:創(chuàng)建新應(yīng)用學(xué)習(xí)鏈接
安裝完 dva-cli 之后,就可以在命令行里訪問到 dva
 命令([不能訪問?](http://stackoverflow.com/questions/15054388/global-node-modules-not-installing-correctly-command-not-found))?,F(xiàn)在,你可以通過 dva new
 創(chuàng)建新應(yīng)用。
$ dva new dva-quickstart

這會創(chuàng)建 dva-quickstart
 目錄,包含項(xiàng)目初始化目錄和文件,并提供開發(fā)服務(wù)器、構(gòu)建腳本、數(shù)據(jù) mock 服務(wù)、代理服務(wù)器等功能。
第五步:如果拉的是別人的demo小例子:項(xiàng)目的.git或者.svn這級目錄
在黑窗口(命令行)中輸入:tnpm install --verbose   //拉下來代碼后要執(zhí)行tnpm install 下載js的依賴包。verbose是為了查看下載包的進(jìn)度
react代碼demo:https://github.com/zuiidea/antd-admin
第六步:啟動項(xiàng)目:
然后我們 在黑窗口(命令行)中輸入:cd
進(jìn)入 dva-quickstart
目錄,并啟動開發(fā)服務(wù)器:
$ cd dva-quickstart
$ npm start
圖片.png
第五步:在瀏覽器中進(jìn)行訪問demo
幾秒鐘后,你會看到以下輸出:
Compiled successfully!The app is running at: http://localhost:8000/Note that the development build is not optimized.To create a production build, use npm run build.

在瀏覽器里打開 [http://localhost:8000](http://localhost:8000/) ,你會看到 dva 的歡迎界面。
第六步:學(xué)習(xí)文檔:
1、react目錄結(jié)構(gòu)介紹:

https://github.com/dvajs/dva-docs/blob/master/v1/zh-cn/tutorial/01-%E6%A6%82%E8%A6%81.md/

2、快速上手學(xué)習(xí)文檔:http://ant-tool.github.io/dora.html
3、12步學(xué)會react:

https://github.com/sorrycc/blog/issues/18
https://www.npmjs.com/package/roadhog

4、React 技術(shù)棧

https://github.com/ruanyf/jstraining/blob/master/docs/react.md

5、h5app前端代碼:

http://gitlab.alibaba-inc.com/aliyun/sales-console-frontend-mobile

6、react代碼demo:

https://github.com/zuiidea/antd-admin

7、redux文檔:

http://redux.js.org(中文文檔)

8、學(xué)習(xí)es6:

http://es6.ruanyifeng.com/#docs/array

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容