/React-AntDesign

React & AntDesign summary

Primary LanguageJavaScript

simplinnovation

React & Ant Design

1. Create React application

$ npx create-react-app yourReactApp

$ cd yourReactApp 

2. Setup Ant Design on React application

  • Install Ant Design package

    $ npm i antd @ant-design/icons
  • Add antd/dist/antd.css at the top of src/App.css

    @import '~antd/dist/antd.css';

3. Run application

  • Modify src/App.js, import Button component from antd.

    import React from 'react';
    import { Button } from 'antd';
    import './App.css';
    
    const App = () => (
    <div className="App">
        <Button type="primary">
            OK
        </Button>
    </div>
    );
    
    export default App;
  • Run it!

    $ npm start

🍔 Lintang Wisesa


lintang ymail lintang facebook lintang twitter lintang youtube lintang linkedin lintang github lintang hackster lintang bio