UNPKG

@tanstack/vue-router

Version:

Modern and scalable routing for Vue applications

23 lines (22 loc) 491 B
import { useRouter } from "./useRouter.js"; import * as Vue from "vue"; //#region src/useNavigate.tsx function useNavigate(_defaultOpts) { const { navigate } = useRouter(); return (options) => { return navigate({ from: _defaultOpts?.from, ...options }); }; } function Navigate(props) { const { navigate } = useRouter(); Vue.onMounted(() => { navigate({ ...props }); }); return null; } //#endregion export { Navigate, useNavigate }; //# sourceMappingURL=useNavigate.js.map