title: NextJS generate page getServerSideProps to getStaticProps
body: <p>using getServerSideProps to do fetch internal API data, the TTFb time is really high, my page run slow.<br>
  So I'm searching for other fetching strategies, my MongoDB data is not large (DATABASE SIZE: 33.84KB), and data does not change often, the best way I think is the State generation page, the total should only 25 pages being generated, but the problem is <code>getStateProps()</code> method can't fetch internal API (development works, production not).
  <br>
  <strong>I try:</strong><br></p>
  <ol>
  <li>useEffect : slower than getServerProps</li>
  <li>export the MongoDB file to data.js and put it into the project as a fake API: it can work with getStaticProp but the date I still want to storge in the database.</li>
  <li>Host API to other domains as external: getStateProps works, approach weird</li>
  <li>hard code every 25 page (X)</li>
  </ol>
  <p><strong>Question:</strong><br></p>
  <ol>
  <li>the method to improve the code and TTFB</li>
  <li>Why getStateProps can't fetch internal API, why design like that.</li>
  </ol>