Keep or retain the value of custom state when page is refresh

States are only temporary they will reset when the page is gone. There is a plugin you can use to capture /path in the url, for example :

https://storywall.app/danowega/message
image

https://storywall.app/id/post/838742093
image