how to get window location in react code example Example: how to get url in react window.location.href