// Lets a view ask App to remount the current route's component in place: // App keys the routed view by path plus this revision, so bumping it gives // the view a fresh instance without a navigation (Create and new on a // create form opens a blank form at the same path). import { readonly, ref } from 'vue' const revision = ref(0) /** Part of App's routed view key; bumped by remountView. */ export const remountRevision = readonly(revision) /** Remounts the current route's view. */ export function remountView(): void { revision.value++ }