how to get domain name in react code example Example: get domain name javascript window.location.hostname