vsCode工具作react开发,几个经常使用插件

1、环境准备:
一、下载安装VSCode,Node.js,Yarn
二、打开命令行终端或powershell,输入yarn global add create-react-app安装react的脚手架create-react-app
三、打开VSCode,安装相应插件
必要:ESLint、DocumentThis、EasyLess、Complete JSDoc Tags、vscode-flow-ide、React native Tools、vscode-wechat、npm、babel-javascript、debugger for chrome、git lens、node debug 二、
可选:javascript (ES6) code snippets、reactjs code snippets、react-native/react/redux snippets for es6/es七、highlight bad chars、color highlight、Path Intellisense、partial diffjavascript

2、新建demo
一、VSCode编辑器中使用快捷键ctrl+`打开终端
二、在终端输入create-react-app demo,自动建立名称为demo的项目
三、cd demo进入demo项目中
四、yarn start或yarn build运行项目java

3、react项目中使用echarts
一、终端输入命令yarn add echarts 引入echarts
二、在须要使用echarts的js文件中,引入echarts模块,具体有哪些能够按需引入的模块列表可查看demo->node_modules->echarts->index.js文件node

// 引入 ECharts 主模块
import echarts from 'echarts/lib/echarts';
import 'echarts/lib/chart/line';
// 引入柱状图
import 'echarts/lib/chart/bar';
// 引入提示框和标题组件
import 'echarts/lib/component/tooltip';
import 'echarts/lib/component/title';

4、快捷键
终端使用ctrl+c退出批处理操做

react

一、vscode-fileheader 
添加文件头 
二、reactjs code snippets 
react 开发的一些简写,提升开发效率 
三、Path Autocomplete 
路径提示功能 
四、git blame 
安装git后, git blame能够基于git去审查每一行的代码最近一次修改的做者git

相关文章
相关标签/搜索