diff --git a/app/vue3/src/client/preview/index.ts b/app/vue3/src/client/preview/index.ts index de81de569756..47be7a4ce431 100644 --- a/app/vue3/src/client/preview/index.ts +++ b/app/vue3/src/client/preview/index.ts @@ -41,7 +41,7 @@ function prepare(rawStory: StoryFnVueReturnType, innerStory?: ConcreteComponent) return { render() { - return h(story, this.$root.storyArgs); + return h(story); }, }; } diff --git a/app/vue3/src/client/preview/render.ts b/app/vue3/src/client/preview/render.ts index 456c209ab04c..6a9cf7e1e648 100644 --- a/app/vue3/src/client/preview/render.ts +++ b/app/vue3/src/client/preview/render.ts @@ -1,15 +1,10 @@ import dedent from 'ts-dedent'; import { createApp, h, shallowRef, ComponentPublicInstance } from 'vue'; -import { Args } from '@storybook/addons'; import { RenderContext, StoryFnVueReturnType } from './types'; const activeStoryComponent = shallowRef(null); -interface Root extends ComponentPublicInstance { - storyArgs?: Args; -} - -let root: Root | null = null; +let root: ComponentPublicInstance | null = null; export const storybookApp = createApp({ // If an end-user calls `unmount` on the app, we need to clear our root variable @@ -17,12 +12,6 @@ export const storybookApp = createApp({ root = null; }, - data() { - return { - storyArgs: undefined, - }; - }, - setup() { return () => { if (!activeStoryComponent.value) @@ -59,13 +48,9 @@ export default function render({ showMain(); - if (!forceRender) { - activeStoryComponent.value = element; - } + activeStoryComponent.value = element; if (!root) { root = storybookApp.mount('#root'); } - - root.storyArgs = args; }