Here I have created a page to showcase the problem I am having.
I have created 2 buttons one will set a session storage and one will clear it and below I have used get to print the session storage.
Now when I click set Item
As we can see a new item is now in the session storage but it is not reflected in the get and even after rerun it still doesn’t shows anything.
But when I reload the page from the top left
It start showing it.
Same goes when I remove item and rerun it stays there but when reload the page only then it updates.
How can I solve this as I can’t use it like this.