Hide an element based on local session variable

There are certain elements on my page where i have dynamic attribute show if localsession.data.loggedin==true

However even if this variable later turns false by loggig out in another tab, the elements still shows , unless the page is refreshed.

That is it’s show value is bound to a variable but it seems it only checks the variable on load?

what would be the best way to make it see the latest variable ? Schedule a flow every second ? Or some App event ? like mouse focus? Which event will be best ? Or am i doing something wrong and the element should be checking the dynamic attribute on its own even after page load?

Community Page
Last updated: