Navigate changes the current location when it renders. It is commonly used in component-level route guards.