If you don’t want persisted data to control this, create a non-persistable entity in your domain model with an attribute to control visibility of Button2. Then create a nanoflow that sets this attribute to false and put that nanoflow behind button1. Because the entity is not persistable and this scenario uses nanoflows, all of this activity takes place client side with no server interaction.
Hope that helps,
Maybe some pictures will be helpful. I created a small example to demonstrate:
Datasource nanoflow for Dataview on page
Nanoflow behind button on page that is circled in red
What happens on the page