Creating a GO BACK functionality in Native app

In my native apps, I refer to pages as stages, as in, profile stage, which is what a user would consider his/her profile page.

I set a state on the native Bubble page (i.e. index) called current_stage. When I need to switch stages, I set a different value to the state. For example, when someone clicks a link to view their “profile page”, I set the state of current_stage to profile. Then I create 2 conditions on the group that holds all the “profile page” elements. The first is that when current_stage is profile, this element is visible. The second is the opposite: when current_stage is not profile, this element is not visible.

To accomplish a “back” function, add a second state called previous_stage. When someone navigates within your app, set the value of the previous_stage to be the formerly visual stage. If the back button is pressed, simply swap the current_stage with the previous_stage value. The conditions on each group (stage) will take care of the rest. NOTE the value of the state has to remain constant. “profile” and “Profile” aren’t the same.