Show/hide vs toggle vs custom state


I’m very curious when to use one or the other. When should you use which action?

Example: I want to show a list of things (products) in a repeating group in a sidebar/menu. When a user clicks an icon, the rg will show or hide. (optional) When another icon is pressed, it will hide it the rg.

Anyone mind to give some insights how you do it with a few examples?


For just a very simple thing, like showing or hiding a single thing, there’s nothing wrong with using show/hide actions.

But for more complex scenarios, where you need to show or hide multiple things at once, using custom states is a log simpler then trying to use multiple conditional show/hide actions.

That said, I almost always use custom stated to control visibility of elements on the page.

1 Like

Thank you for your reply.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.