redirect to home page react code example Example: how to redirect to a website in react window.location.href = 'http://domain.com';