title: Cannot read property 'getState' of undefined error
body: <ul>
  <li><p>I am trying to add the react sticky header to my stepper.</p></li>
  <li><p>but the problem is if I add inside my App.js its not rendering.</p></li>
  <li>so I started debugging the App.js code.</li>
  <li>if I give console inside my render method of App.js its not displaying     console.log("App---->");</li>
  <li>right now I am getting Cannot read property 'getState' of undefined error</li>
  <li>can you tell me how to fix it.</li>
  <li>so that in future I will fix it myself.</li>
  <li>providing my code snippet and sandbox below</li>
  </ul>
  
  <p><a href="https://codesandbox.io/s/6zv5n0ro9z" rel="noreferrer">https://codesandbox.io/s/6zv5n0ro9z</a></p>
  
  <p><strong>App.js</strong></p>
  
  <pre><code>import React from "react";
  import { StickyContainer, Sticky } from "react-sticky";
  // ...
  
  class App extends React.Component {
    render() {
      console.log("App----&gt;");
      return (
        &lt;StickyContainer&gt;
          {/* Other elements can be in between `StickyContainer` and `Sticky`,
          but certain styles can break the positioning logic used. */}
          &lt;Sticky&gt;
            {({
              style,
  
              // the following are also available but unused in this example
              isSticky,
              wasSticky,
              distanceFromTop,
              distanceFromBottom,
              calculatedHeight
            }) =&gt; &lt;header style={style}&gt;{/* ... */}&lt;/header&gt;}
          &lt;/Sticky&gt;
          {/* ... */}
        &lt;/StickyContainer&gt;
      );
    }
  }
  </code></pre>
  
  <p><strong>index.js</strong></p>
  
  <pre><code>import React from "react";
  //import ReactDOM from "react-dom";
  import Demo from "./demo";
  import App from "./components/App";
  import { render } from "react-dom";
  import { logger } from "redux-logger";
  import { Provider } from "react-redux";
  
  import { createStore, applyMiddleware } from "redux";
  //import reducer from "./reducers";
  import thunk from "redux-thunk";
  
  //const store = createStore(reducer, applyMiddleware(thunk, logger));
  
  //ReactDOM.render(&lt;Demo /&gt;, document.querySelector("#root"));
  
  render(
    //     &lt;Provider store={store}&gt;
    &lt;Provider&gt;
      &lt;App /&gt;
    &lt;/Provider&gt;,
    document.getElementById("root")
  );
  </code></pre>