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