react fiber 指react 16以上的版本
引入react的方式:
1、引入.js檔案
2、使用腳手架工具(推薦)
推薦使用react官方提供的腳手架工具:create-react-app
React開發環境準備
(npx 是 npm 的高級版本,npx 具有更強大的功能)
npx create-react-app my-app
cd my-app
npm start
npx create-react-app 使用淘寶鏡像
1、查看npm的鏡像源
npm config get registry
// 默認是:https://registry.npmjs.org/

2、修改成淘寶的鏡像源
npm config set registry https://registry.npm.taobao.org

3、create-react-app創建專案
npx create-react-app myapp
最后的運行結果

瀏覽器訪問:

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/126448.html
標籤:JavaScript
上一篇:JavaScript中的apply()、call()、bind()
下一篇:React組件的簡單演示
