window location in react

JavaScript
window.location.href = '/dashboard';
Source

Also in JavaScript: