1、创建项目

  1. //node.js自带npx,不需安装即可使用
  2. //创建项目
  3. npx create-react-app ***
  4. npx create-react-app my-app
  5. //启动项目
  6. npm start

2、安装插件快捷生成基本框架

  1. 插件名
  2. Reactjs code snippets
  3. //快捷键--- rcc
  4. import React, { Component } from 'react';
  5. class App extends Component {
  6. render() {
  7. return (
  8. <div>
  9. </div>
  10. );
  11. }
  12. }
  13. export default App;

3、Ant-design组件的引入

3-1安装

  1. yarn add antd

3-2引入

  1. //index.js
  2. import "antd/dist/antd.css";
  1. //App.js
  2. import { Button } from 'antd';
  3. <Button type="danger">Danger</Button>