title: Change route without reloading page with Next.js
body: <p>Whenever the user clicks on the continue button, a function is fired and in that function, I call:</p>
  <p><code>push(&quot;/signup/page-2&quot;, undefined, { shallow: true });</code></p>
  <p>All dynamic routes that looks like <code>/signup/[page].js</code> that returns <code>&lt;Component /&gt;</code></p>
  <p>I also have a <code>/signup/index.js</code> that returns <code>&lt;Component /&gt;</code></p>
  <p>The Problem is:</p>
  <p>The page reloads and all state is cleared each time <code>push(&quot;/signup/page-2&quot;, undefined, { shallow: true });</code> is called.</p>
  <p>It's also worth mentioning that this app was a CRA with react-router-dom app that was converted to a next.js app</p>