title: Is using Redux with Next.js an anti-pattern?
body: <p>I'm building a Next.js app and it currently is using Redux. As I am building it I am wondering if the use of Redux is really necessary and if its use is actually an anti-pattern. Here is my reasoning:</p>
  <p>In order to properly initialize the Redux Store in Next.js, you must create a custom <code>App</code> component with a <code>getInitialProps</code> method. By doing this you are disabling the <a href="https://nextjs.org/docs/advanced-features/automatic-static-optimization" rel="noreferrer">Automatic Static Optimization</a> that Next.js provides.</p>
  <p>By contrast, if I were to include Redux on the client-side, only after the App has mounted, then the Redux store will reset after every server-side navigation. For instance, I have a Next.js app that initializes the Redux store on the client-side, but when routing to a dynamic route such as <code>pages/projects/[id]</code>, the page is server-side rendered, and I have to re-fetch any information that was in the store.</p>
  <p>My questions are:</p>
  <ol>
  <li>What are the benefits of a Redux store in this circumstance?</li>
  <li>Should I initialize the store in the root <code>App</code> component and forego the Automatic Static Optimization?</li>
  <li>Is there a better way to do to manage state in Next.js 9.3 with <code>getStaticProps</code> and the <a href="https://nextjs.org/docs/basic-features/data-fetching" rel="noreferrer">other data fetching methods</a></li>
  <li>Am I missing something?</li>
  </ol>