In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail the method of developing react by vscode. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
How does vscode develop react?
Create a React.js project using the VSCode editor
First, environmental preparation:
1. Download and install VSCode,Node.js,Yarn
2. Open the command line terminal or powershell, and type yarn global add create-react-app to install the scaffolding create-react-app of react.
3. Open VSCode and install the corresponding plug-in
Necessary: ESLint, DocumentThis, EasyLess, Complete JSDoc Tags, vscode-flow-ide, React native Tools, vscode-wechat, npm, babel-javascript, debugger for chrome, git lens, node debug 2,
Optional: javascript (ES6) code snippets, reactjs code snippets, react-native/react/redux snippets for es6/es7, highlight bad chars, color highlight, Path Intellisense, partial diff
2. Create a new demo
1. Use the shortcut key ctrl+ `to open the terminal in the VSCode editor.
2. Type create-react-app demo in the terminal and automatically create a project named demo.
3. Cd demo enters the demo project
4. Run the project with yarn start or yarn build
3. Use echarts in react projects
1. The terminal input command yarn add echarts is introduced into echarts
2. In the js file that needs to use echarts, introduce echarts module. For a list of modules that can be introduced as needed, please see demo- > node_modules- > echarts- > index.js file.
/ / introduce ECharts main module import echarts from 'echarts/lib/echarts';import' echarts/lib/chart/line';//, introduce bar chart import 'echarts/lib/chart/bar';//, introduce prompt box and title component import' echarts/lib/component/tooltip';import 'echarts/lib/component/title'
Shortcut keys
The terminal exits the batch operation using ctrl+c.
On the vscode development of react methods to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.