how to get the current url source hfres using react js code example Example: how to get url in react window.location.href