安裝vscode:https://code.visualstudio.com/html
安裝node.js:https://nodejs.org/en/node
安裝gitbash:https://gitforwindows.org/react
根據我的習慣將vscode設置成本身喜歡的語言,我這裏設置爲中文git
1.快捷鍵ctrl+shift+p 輸入configlanguage 改成zh-cngithub
安裝中文語言包,而後重啓shell
2.把vs code的終端改成git bashnpm
搜索shell 找到Terminal › Integrated › Shell: Windows,將安裝好的git裏面的bash路徑複製到設置裏windows
3.重啓vs codebash
地址:https://reactjs.org/docs/create-a-new-react-app.html#create-react-appapp
命令:
npx create-react-app my-app cd my-app npm start
執行 npx create-react-app clientsite命令後 給建立了下面這些文件
git地址:https://github.com/chuankang/React
而後在vs code中選擇文件夾
克隆下來後 nmp start 運行 報錯
由於項目文件夾下沒有node_modules文件夾,上傳git時是被忽略了(200M左右) 執行npm install 而後 npm start
ok