All sample next sites live within the /examples
directory.
Next is installed at the root, but will run within sub directories as well.
- At repo root run
npm install
- Within each example run:
npm install
- in each example run:
npm run dev
to see the live version
examples/json-page
- Shows how to return JSON from a Page route instead of an API route. This is helpful for instances like Health Check or Status pages.
examples/share-page-props
- Shows how with a Custom `App` you can share page props among different components.
examples/context-api
- Shows how to use React's context API within Next.