V-btn visible if another component is visible

I have a vue instance that has 3-4 components, these components may be “visible” or not, depending user interaction.
So I have a button at a component that I want to be visible only if another component is visible at the vue instance, how can I do it?
I used the ref property ( < div ref=‘div’ >) but it did not work. ( I used this.$root.$refs.ProductDetailsTable.$refs.saveButton but it did not work)
How for example I can use the refs property?
[Edit] I used a vuex state variable, is there another option?

Hello @dimis283
can you please share the code?