Fetch article data
In this guide, you will fetch and display article data in the single article page.
Summary
Section titled βSummaryβIn this tutorial, we have:
- Created a Prisma query to fetch a single article.
- Updated the single article page to fetch and display the article data.
- Added a simple error message if the article is not found.
π Assignment documentation
Section titled βπ Assignment documentationβWe need to update your assignment to document this new feature. π
- How did you fetch the article data in the single article page?
- What did you show on the screen if the article was not found? How did you handle this in the code?
Whatβs next?
Section titled βWhatβs next?βIn the next guide, weβll display and style the article content on the single article page.