Forum Academy Marketplace Showcase Pricing Features

What level do you define a Custom State?

Hi,

I have created a navigation system which is working as expected based on the use of Custom States to show/hide depending on the state value…although I am now wondering whether I have set/created the Custom State at the wrong level.

Here is an example, this shows that when Index’s (page) custom State (navigate_to) is set to “Store” then make this group visible.

I am wondering whether this should should rather be, When: This Group’s navigate_to is “Store”

please help?

Honestly, it’s really what works for you and your logic. It doesn’t really matter which element ‘owns’ the state, as long as it makes sense for you.

The only case where it would matter would be if the element is in a repeating group, because there you have more than on instance of an element, in each cell. But in such a case, the answer is very clear: if the state uses the current cell’s thing, that it should be on an element in the current cell.