Creating a group of elements

Hello everyone.
I’m playing around with all sorts of projects and this isn’t the first time I’ve had the task of making several identical blocks, with identical buttons, with identical behavior.
Usually this is done via strl+c, strl+v and replacing numbers in id.
But here’s a task where each block has not one button, but several. Is there any way to make 10 such blocks without writing each of them manually? And is there a convenient way to write the logic for the buttons once and then apply it to the button class?

Hello @uk141,

You are looking for an all in one component. :slight_smile:

A simpler form of this could also just be a function that returns a pattern-matched set of components.

1 Like

To add on to @jinnyzor’s reply, here an example for mentioned function and pattern matching callbacks.

Thank you very much =)
I’ll go study and think about how to screw it all together.

1 Like