Go back workflow in one page app

Hello,

I’m building a one page mobile app that navigate between pages by showing and hiding groups with custom states (not url parameters).

My problem is i don’t know how to build a “go to previous page” navigation !

I tried with custom states but after 2 or 3 back navigations it doesn’t work anymore !

I think i should create a data type to store navigation history but I’m afraid it will slow down the app !

Can someone help me please !

There’s a native “go to previous page” action in bubble. Or you can store the previous page as a parameter and reference that when navigating back.

Hi,

My app is a one page mobile app, and I use custom states to show and hide groups to simulate page navigation. So there is no navigation in reality. That’s why the native “go to previous” action of bubble doesn’t work for this kind of apps.

Oh whoops! I missed the one page part. Well in that case, I would still recommend using URL parameters (over custom states).

Instead of setting a state to show/hide groups, navigate to the page with a parameter to show a specific group.

The browser will log each new page redirect (which is the same page, but different parameter) so they can go back.

Hello and thx for your answers,

To publish the app on the App Store or the Play Store, the app should be build with custom states and not url parameters.

With url parameters, when you click on “this page is native app” errors appears in the workflow screen.

So I can’t use url parameters and that’s why I ask for solution with custom states.

1 Like

to solve this you will need to create an empty state that reset according to the page you want your users to navigate to.

Not a boolean state but a text state.

I have created a video to make it easy for you

1 Like

Hi,

Thx for the video but I tried this and It doesn’t work.

My app is like Instagram. In some screens, the user can go to the product details screen, can comment, can send a message to the vendor or can go to the vendor profile screen…

So there are many possibilities to go to different screens from one particular screen.

The deal is to find somewhere where to store navigation history and the custom states can’t go so far !

I finally create a data type when every user store every screen custom states. A kind of navigation history. And as they go back to previous page, the data of that page is deleted from the data base.

I worked on that today and it works. I wonder that won’t slow the app in the futur.

Anyhow, thanks for your help

How did this work out for you? Also, why are you under the impression that custom states are the play as opposed to URL parameters? I’ve read arguments in both directions, and I have chosen URL parameters given the benefits with navigation. I only use custom states for my Login screen, and with a few popups for posting and whatnot.

Hi,

I also heard that URL parameters are more suitable for navigation on one page apps and I’ve used them to build my app. But when i wanted to turn the app to a native app, bubble listed me several errors related to the use of URL parameters (which is normal because a native app has no URL). So the only possibility left is to use the custom states.

image

To build navigation history, I added a Data Type in my database with the list of custom states. Every time I navigate, I add a line with the current custom states to my data type, and every time I use return button, I set the states of the last line to navigate and then delete that line.

Ah, I understand. I just unticked the “this is a native app” and made sure it looked good on responsive editor for any situation. After using Jasonelle and Xcode it looks and works fine.

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