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