This is a Next.js project bootstrapped with create-next-app
.
I created this repository to guide the following blog bost: https://dev.to/elisabethleonhardt/create-a-custom-error-component-in-nextjs-ssr-csr-4kk9
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
Build the project
npm run build
npm run start
then, navigate to http://localhost:3000/characters to see the error for the server-side rendered page.
See comments in pages/locations.js and pages/characters.js, fix the API calls and you will see the data as described in my blog post.
Feel free to fork this and experiment a lot! Happy coding!