@tanstack/vue-router
Version:
Modern and scalable routing for Vue applications
21 lines (20 loc) • 669 B
JavaScript
import * as Vue from "vue";
//#region src/matchContext.tsx
var matchContext = Symbol("TanStackRouterMatch");
var dummyMatchContext = Symbol("TanStackRouterDummyMatch");
/**
* Retrieves the match ID from the component tree
*/
function injectMatch() {
return Vue.inject(matchContext, Vue.ref(void 0));
}
/**
* Retrieves the dummy match ID from the component tree
* This only exists so we can conditionally inject a value when we are not interested in the nearest match
*/
function injectDummyMatch() {
return Vue.inject(dummyMatchContext, Vue.ref(void 0));
}
//#endregion
export { injectDummyMatch, injectMatch, matchContext };
//# sourceMappingURL=matchContext.js.map