Canceling navigations
Navigations can be cancelled from the onNavigate
callback.
function Route() {
let [Form, busy, loading, navigations] = useForm();
function handleNavigate(event) {
event.preventDefault();
}
return (
<>
<Form method="post" onNavigate={handleNavigate}>
...
</Form>
</>
);
}