DEV Community

Discussion on: How to get data from API and show static data from server using NextJS?

Collapse
 
sunflower profile image
sunflowerseed • Edited

Ok, I found later: check out getServerSideProps() to do SSR, and getStaticProps() to do Static Generation... just read the docs on how to use them.

Here is a demo: codesandbox.io/s/quirky-zhukovsky-...

Collapse
 
mkubdev profile image
Maxime Kubik

You should do the tutorial of next.js, it's cover all concepts