title: Error with "Collapsed inline menu" by Ant Design
body: <p>I am new to the world of react and javascript.
  I encounter quite a mistake with the Ant Design code for the collapsed inline menu.
  I tried several solutions found on the forum but without success.</p>
  
  <p>And I do not quite understand the notion of one of the errors that is "Must Use destructuring state assignment"</p>
  
  <p>I stick you my code and the errors that are indicated to me.</p>
  
  <p>for the error "Missing Parentheses around multilines JSX" I have already tried the mettres but I have another error that appears.</p>
  
  <p>when I click on the button nothing happens</p>
  
  <p>I hope you can help me.</p>
  
  <p>thank you in advance</p>
  
  <pre><code>import React, { Component } from 'react';
  import { Menu, Icon, Button } from 'antd';
  
  const { SubMenu } = Menu;
  
  class RightVerticalMenu extends Component {
    state = {
      collapsed: false,
    };
  
    toggleCollapsed = () =&gt; {
      this.setState({
        collapsed: !this.state.collapsed,
      });
    };
  
    render() {
      const { collapsed } = this.state;
  
      return (
        &lt;div className="right-menu" style={{ width: 256 }}&gt;
          &lt;Button
            type="primary"
            onClick={this.toggleCollapsed}
            style={{ marginBottom: 16 }}
          &gt;
            &lt;Icon type={this.toggleCollapsed ? 'menu-unfold' : 'menu-fold'} /&gt;
          &lt;/Button&gt;
          &lt;Menu
            defaultSelectedKeys={['1']}
            defaultOpenKeys={['sub1']}
            mode="inline"
            theme="dark"
            inlineCollapsed={collapsed}
          &gt;
            &lt;SubMenu
              key="sub1"
              title={
                &lt;span&gt;
                  &lt;Icon type="mail" /&gt;
                  &lt;span&gt;Métérologie&lt;/span&gt;
                &lt;/span&gt;
              }
            &gt;
              &lt;Menu.Item key="5"&gt;Option 5&lt;/Menu.Item&gt;
            &lt;/SubMenu&gt;
  
            &lt;SubMenu
              key="sub2"
              title={
                &lt;span&gt;
                  &lt;Icon type="appstore" /&gt;
                  &lt;span&gt;Chat&lt;/span&gt;
                &lt;/span&gt;
              }
            &gt;
              &lt;Menu.Item key="9"&gt;Option 9&lt;/Menu.Item&gt;
              &lt;Menu.Item key="10"&gt;Option 10&lt;/Menu.Item&gt;
            &lt;/SubMenu&gt;
          &lt;/Menu&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default RightVerticalMenu;
  
  </code></pre>
  
  <p>console errors :</p>
  
  <pre><code>Must Use destructuring state assignment[29, 19]
  Missing Parentheses around multilines JSX[55, 15] and [67, 15]
  </code></pre>