NextJS static site optimization is disabled site wide when getInitialProps is used in _app file. Would be cool to see this template use getStaticProps so people using this template could reap the benefits on NextJS SSG.
Further more feels like using class components are a bit out of date. I have tried refactoring this a couple times with no avail. Would also be cool to see this refactored into functional components.
I am not an expert on the NextJS APIs so have been having a hard time finding a way to access all those same props the same way as the class version.
Acceptance Criteria
[x] Refactor _app file to use getStaticProps over getInitialProps.
[x] Use functional components/hooks over class based hooks in _app
Description
NextJS static site optimization is disabled site wide when
getInitialProps
is used in_app
file. Would be cool to see this template usegetStaticProps
so people using this template could reap the benefits on NextJS SSG.Further more feels like using class components are a bit out of date. I have tried refactoring this a couple times with no avail. Would also be cool to see this refactored into functional components.
I am not an expert on the NextJS APIs so have been having a hard time finding a way to access all those same props the same way as the class version.
Acceptance Criteria
getStaticProps
overgetInitialProps
._app