Say I am on my React app at http://mysite/. Then I either
(A) Click to navigate to https://mysite/#/myroute
(B) click on a browser bookmark to https://mysite/#/myroute
Can the client-side JavaScript route i.e. MyRoute know whether the navigation was via a browser bookmark vs clicking on some link?
Can the client-side JavaScript route i.e. MyRoute know whether the navigation was via a browser bookmark vs clicking on some link?
If you mean "clicking on some internal link", then yes. But there is no way to distinguish a click on a bookmark from a click on an external link that leads to your website.
In any case, you leverage the document.referrer property: if it's equal to an empty string, the user navigated from an external source, otherwise it will contain the previous internal url.