We are experiencing issues with Gatsby where the location
state is being persisted on refresh. We would like the state to be reset when refreshing, or just making sure a certain piece of that state is not present when navigating to a url.
There are two options:
- Have a method to determine if we have navigated to the page via a url or refresh vs navigating via a Gatsby link (which is able to set the
location
state).
- Find a way to empty the state when refreshing
The current methods we have encountered do not seem ideal, please advise if there is a generally accepted approach to this.
Thanks in advance.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…