I have the browser cache as the central single source of truth.
When I want to change the app state, I just change the broser cache and call setState to trigger a render().
Everything works fine unless the user changes the adress manually (refreshes the window, clicks on a bookmark, etc...), to fix that, I made the router's render method (<Router render={render}>
) save the url's params myUrl/:myVar1/:myVar2
in the browser cache too
My issue is that I don't want the router to ovveride what is in the cache unless it was called manually (eg. by pasting a url). Is there a way to recognize the origin of the url change (if it comes from a history.push or another action)?