title: TypeError: Cannot read property 'getState' of null
body: <p>TypeError: Cannot read property 'getState' of null. I did't install redux. I am trying to add the react antd Menu to my Sidebar page. but the problem is if I add inside my App.js it's not rendering. right now I am getting TypeError: Cannot read property 'getState' of null. can you tell me how to fix it?</p>
  <p>showing this error:
  <a href="https://i.stack.imgur.com/LjO5e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LjO5e.png" alt="enter image description here" /></a></p>
  <p>Index.js</p>
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import 'antd/dist/antd.css';
  import App from './App';
  
  ReactDOM.render(
    &lt;React.StrictMode&gt;
      &lt;App /&gt;
    &lt;/React.StrictMode&gt;,
    document.getElementById('root')
  );
  </code></pre>
  <p>App.js</p>
  <pre><code>import React from 'react';
  import Login from './Components/login';
  import Sidebar from './Components/sidebar';
  import Course from './Components/course';
  import Downloads from './Components/downloads';
  import Settings from './Components/settings';
  import About from './Components/about';
  
  function App() {
    return (
      &lt;div className=&quot;container&quot;&gt;
        &lt;Sidebar /&gt;      
      &lt;/div&gt;
    );
  }
  
  export default App;
  </code></pre>
  <p>Here is the code:</p>
  <p>Sidebar.js</p>
  <pre><code>import React from 'react';
  import { Menu } from 'antd';
  import { MailOutlined, CalendarOutlined } from '@ant-design/icons';
  
  function Sidebar() {
    return (
      &lt;React.Fragment&gt;
        &lt;Menu.Item key=&quot;1&quot; icon={&lt;MailOutlined /&gt;}&gt;
          Courses
        &lt;/Menu.Item&gt;
        &lt;Menu.Item key=&quot;2&quot; icon={&lt;CalendarOutlined /&gt;}&gt;
          Downloads
        &lt;/Menu.Item&gt;
      &lt;/React.Fragment&gt;
    );
  }
  
  export default Sidebar;
  </code></pre>
  <p>package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;udeler&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@testing-library/jest-dom&quot;: &quot;^5.11.4&quot;,
      &quot;@testing-library/react&quot;: &quot;^11.1.0&quot;,
      &quot;@testing-library/user-event&quot;: &quot;^12.1.10&quot;,
      &quot;antd&quot;: &quot;^4.9.1&quot;,
      &quot;node-sass&quot;: &quot;^4.14.1&quot;,
      &quot;react&quot;: &quot;^17.0.1&quot;,
      &quot;react-dom&quot;: &quot;^17.0.1&quot;,
      &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
      &quot;react-scripts&quot;: &quot;4.0.1&quot;,
      &quot;web-vitals&quot;: &quot;^0.2.4&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-scripts start&quot;,
      &quot;build&quot;: &quot;react-scripts build&quot;,
      &quot;test&quot;: &quot;react-scripts test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: [
        &quot;react-app&quot;,
        &quot;react-app/jest&quot;
      ]
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    }
  }
  </code></pre>