State seems to reset itself

So I have a page on my app that is set up like this:

Where the cart button at the top right opens the cart which is a reusable element.

When I click the button “add to cart” it sets a state of the reusable element (called “current_page”) to “cart”. Using the inspect tool, I can see that this happens correctly:

Then when I click the button at the top right to open the cart, it somehow changes the state to a different value.

Here is the workflow to open the cart. You can see that there is no action to set the state:

but then, using the inspect tool, you can see that the current_page state value has changed:

Also, the default value of “current_page” is “cart” so clearly that has nothing to do with what is going on here.

My guess is this is something that requires access into my bubble app (which I can’t provide) in order to debug but maybe someone has an idea as to what is going on here?


I figured it out. I had other reusable elements on the page which contained the RE that I was referring to in the post. Some screenshots were from one RE while other screenshots were from another. When I set the state of the correct RE, it works as expected.