Closed rconard closed 3 years ago
@craigshoemaker could you please look at this one as well?
Thanks for this, @rconard!
With commit b6dbddd78d5c30191f7cf2ea6aebe06ffa748803, we updated the repo to use getStaticPaths
and getStaticProps
. The implementation we chose was minimal on purpose in an effort to make the app as easy to understand as possible.
Your changes are an excellent addition to the app, but for now, we're going to just stick to the more streamlined version of supporting the updated API.
We really appreciate your contribution and look forward to further ideas you may have in the future!
The current version of nextjs-starter uses
getInitialProps
instead ofgetStaticProps
.This PR updates the starter to use
getStaticProps
andgetStaticPaths
and addsnext/head
andnext/link
where appropriate.See the Next.js Static Generation docs here.
I created this PR after using the nextjs-starter generator for a project and ran into issues with
getInitialProps
that were difficult to debug. BecausegetInitialProps
works reliably during local development, this issue occurs in GitHub Actions CI/CD where it is considerably harder to debug. By updating the starter to usegetStaticProps
, this issue will be avoided in the future.