---
title: "Discussion on \"How to Fetch From Nextjs Api and Render in Component ?\" | Hashnode"
description: "Discussion on \"How to Fetch From Nextjs Api and Render in Component ?\". Create a Next.js API route (/api/data) that hosts a JSON response.\n\nCreate a UI component (DataList) that fetches and renders the data.\n\nUse the UI component in a page (/pages/index.js) to display the data.\n\n\nhttps://www.youtube.com/watch?v=ksWpvLIFV..."
url: "https://hashnode.com/posts/how-to-fetch-from-nextjs-api-and-render-in-component/67bed1adb512f2b705ef9ea8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Fetch From Nextjs Api and Render in Component ?](https://vpnwan.hashnode.dev/how-to-fetch-from-nextjs-api-and-render-in-component?utm_source=hashnode&utm_medium=feed)

Create a Next.js API route (/api/data) that hosts a JSON response. Create a UI component (DataList) that fetches and renders the data. Use the UI component in a page (/pages/index.js) to display the data. https://www.youtube.com/watch?v=ksWpvLIFV...

Feb 26, 2025 · 1 min read · vpnwan.hashnode.dev  
Read the article

-   [#nextjs-api](https://hashnode.com/tag/nextjs-api)
-   [#nextjs](https://hashnode.com/tag/nextjs)

## Written by

[Namit Singh Nirwan](https://hashnode.com/@vpnwan)

@vpnwan · india

  
[View profile](https://hashnode.com/@vpnwan)

web development

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
