Skip to content
Discussion options

You must be logged in to vote

You can have both static and dynamically rendered pages in the same Next.js project.
For the pages that are static, you have the getStaticProps function but you probably already know this as you said that you already have the static generated blog. These will be rendered at build time.

For pages that are dynamic, you can either use the getServerSideProps if you want to render this page on the server-side or use a normal fetch in your react component code to contact your API from the front-end.

Note that this decision is on a per-page basis, you can definitely do both on the same project.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@muke5hy
Comment options

Answer selected by muke5hy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants