UNPKG

@tanstack/vue-router

Version:

Modern and scalable routing for Vue applications

23 lines 893 B
import * as Vue from 'vue'; export const nonRouteComponentContext = process.env.NODE_ENV !== 'production' ? Symbol('nonRouteComponentContext') : undefined; const NonRouteComponentContextProvider = process.env.NODE_ENV !== 'production' ? Vue.defineComponent({ name: 'NonRouteComponentContextProvider', props: { value: { type: String, required: true, }, }, setup(props, { slots }) { Vue.provide(nonRouteComponentContext, Vue.computed(() => props.value)); return () => slots.default?.(); }, }) : undefined; export function renderInNonRouteComponentContext(component, props, context) { return Vue.h(NonRouteComponentContextProvider, { value: context }, { default: () => Vue.h(component, props) }); } //# sourceMappingURL=nonRouteComponentContext.jsx.map