A hook that returns the UIRouter instance
Example:
const FormSubmit() {
const router = useRouter();
const form = useContext(FormFromContext);
function submit() {
validateForm(form)
.then(submitForm)
.then(() => router.stateService.go('home'));
}
return <button onClick={submit}>Submit form</button>;
}
Generated using TypeDoc