This is a custom NEXT 12 (USING THE OLD NEXTJS STYLE, NOT APP FOLDER - FOR THAT SEE THIS REPO) boilerplate that includes a setup for MUI & React Context.
Run the development server:
npm run dev
# or
yarn dev
Everything is standardized to Next JS with a few caveats:
- Styles are in the
styles
folder along with the MUI theme customizations for light and dark mode. Note that you can't havestyles
files inside the Pages folder. - A services folder exist for abstracting away API calls.
- A
components
folder exists for all abstracted components. - A
context
folder exists for the global react Context that is set in the first client component loaded after a page load.
We're able to get all the state gotten from getServersideProps / getInitialProps through the custom getContext hook within any component in the React tree. It automatically gets populated with the pageProps passed in from _app.