---
title: "Discussion on \"Creating a generic posts function - part 14\" | Hashnode"
description: "Discussion on \"Creating a generic posts function - part 14\". For this article, I want to add the latest two blog posts to our homepage. However, it quickly made me realize we are reusing the same code repeatedly.\nSo let's start this article by re-doing some of the code so we can reuse it in existing components..."
url: "https://hashnode.com/posts/creating-a-generic-posts-function-part-14/6352307d08df76d068d534be"
---

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

Discussion

# [Creating a generic posts function - part 14](https://h.daily-dev-tips.com/creating-a-generic-posts-function-part-14?utm_source=hashnode&utm_medium=feed)

For this article, I want to add the latest two blog posts to our homepage. However, it quickly made me realize we are reusing the same code repeatedly. So let's start this article by re-doing some of the code so we can reuse it in existing components...

Oct 21, 2022 · 4 min read · h.daily-dev-tips.com  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Chris Bongers](https://hashnode.com/@dailydevtips)

@dailydevtips · Cape Town, SA

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

Looking to get into development? As a full-stack developer I guide you on this journey and give you bite sized tips every single day 👊

I'm a full-stack developer from South Africa 🇿🇦. I love writing about JavaScript, HTML and CSS.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
