There are multiple ways to fetch data in next js and I wanted to demo some common ways.
Next so fetch
An app that demos multiple ways to fetch data with next js
next-data-fetching-app-router.vercel.app
To run:
npm install
npm run dev
npm run build
npm start
Helpful video around differences btw next js 12 and 13: https://www.youtube.com/watch?v=WfgSm_q6HeE
Server vs Client Components: https://www.youtube.com/watch?v=aoHK8skFZ1U
This repo is uses app router as it seems to be the latest flavor promoted by Next JS/Vercel.
- How do we easily use mdx, rendering markdown content in next js? Is it worth it? (Might be bc of code snippets and syntax highlighting.)
I had to use wrapper components because when loading both data in the same page, one with timeout and one without, it caused examples to not be accurate.