Thoughts on this new node? node-red-contrib-components


It would seem it is an alternative to the sub-flow.

My take is that it is, but in a different flavour of how it is done. But: I have been wrong before.

So I am politely asking here other people's thoughts on what it is and what it offers compared to the sub-flow scheme already in Node-Red.

disclaimer - I havent used it - but I can see the motivation.

I think it could be useful. Its almost like a subroutine (and almost wish it had been called node-red-contrib-subroutine).

2 benefits I see over subflow is it easier to setup & you can see node-statuses etc (as nodes are on the main flow not in a hidden instance).
1 downside is you still have the flows somewhere on a tab unlike the subflow (which is a nice neat self contained unit). (no biggie TBH)

I may have more constructive feedback once I install it and give it a go. however, at this point, I have not installed it as I can achieve most things with link nodes and / or subflows - but I will keep it in mind when I next need simple subflow-like functionality.

What are your thoughts?

Other than having an in-line run node, I really don't see any difference or benefit over using link-out/-in nodes which is what I do now. I rarely even use subflows any more.

1 Like

I tried it out and no advantage over link in and out nodes as Julian says

Subflows are still the tool for job went you want to reuse the same set of nodes as a package

1 Like

I thought that at first too but I believe the difference is that it only returns to the output of the calling "component" node where as a link node would return to all linked nodes & you would need a topic it other means for understanding/routing the return of used multiple times.

Think of a subroutine call where the gosub return returns to that caller only with the result of the subroutine calculation.


Good point - I hadn't realised that

1 Like

So now I am using this set of nodes - here are my thoughts. (Spoiler - I'm liking it)

Apart from the odd naming of nodes...
... this is a pretty good set of nodes.

Me likey - a lot :slight_smile:


PS, if i were pushed for alternative naming, it'd be...
node-red-contrib-components --> node-red-contrib-subroutine
comp start --> Subroutine Define
comp return --> Subroutine Return
use comp --> Subroutine Call

Hi folks,
sorry I missed this conversation. I saw regular downloads, but until now did not really expect a discussion. Thanks to @Steve-Mcl, I learned, that people do use my nodes, so I have to bring some more focus to the forum.

It makes me think, that some (or most?) of you did not understand the purpose / intention of node-red-contrib-components. I tried to explain all of that in the readme. But obviously that was either too long or not clear enough.

Did you check out node-red-contrib-actionflows before? That was the node, I used a lot, until it occured to me, that their understanding of interface was not mine. But still, it is a widely used set of nodes and well done.

I am very pleased to see you guys being interested and I would love to discuss, how components could be improved and be made more useful.
Starting with @Steve-Mcl suggesting a renaming, I invite you to talk about that in a separate thread:

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.