# Custom node vs subflow

**URL:** <https://discourse.nodered.org/t/custom-node-vs-subflow/49434>\
**Category:** Developing Nodes\
**Created:** [6 August 2021 19:47 UTC](https://discourse.nodered.org/t/custom-node-vs-subflow/49434 "2021-08-06T19:47:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [6 August 2021 20:49 UTC](https://discourse.nodered.org/t/custom-node-vs-subflow/49434/4 "2021-08-06T20:49:40Z")

</div>

> [@dczysz](#):
>
> The goal is really to just eliminate duplicate function node code, since this is/will be used in about 10-20 places in various flows.

I guess the trade-off is one is easy to maintain (sub-flow - changes in one place only) and the other is easier to customize (repeated code - easier to tweak for a particular use case).

---

_[View the full topic](https://discourse.nodered.org/t/custom-node-vs-subflow/49434)._
