Why can you only use an id in one output only?

Hey guys, you can handle the fact that you can use an id for output only once with triggered_id, pattern matching, and so on.

I was wondering about the actual reason why you can only use an id once for an output.

I am learning js and react right now and I see how much cleaner the code is when you can output to the same element multiple times (set the value / switch the children’s) from different places in the code.

During in-dash callbacks, you can only do this from a single callback function.

So I wondered why and if there are any plans to change this.

Hi @Matan , what about using dash extensions? It allows for targeting the same output from different callbacks as well as to allow for no output callbacks

Not sure if there are any limitations to the use cases but it’s my best bet. (Seems that you cannot use it with some forms of pattern matching)

Reg,J.

Hello @Matan,

They are working on adjusting this currently.

I would gather that its ease of parsing the responses and verifying the layout is functioning properly.

I agree with your assessment that it makes the code cleaner when you can just change the data in different places.

It doesn’t support MATCH, which is a problem for me.

Yes, it would make writing dash callbacks so much cleaner and easier I think when they actually implement this feature it will be one of the biggest changes for so many users. for me it will be for sure!

1 Like

Unfortunately, the current implementation is invalid for MATCH. Maybe you can use ALL instead, at least until the official Dash solution is ready?