Skip to content

Commit

Permalink
Merge pull request #22229 from storybookjs/kasper/vue3-reactivity-v6-…
Browse files Browse the repository at this point in the history
…compatible

Vue3: Rollback v7 breaking change and keep reactive v6-compatible API
  • Loading branch information
shilman authored and kasperpeulen committed May 23, 2023
1 parent 7100975 commit 9cee100
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/renderers/vue3/src/decorateStory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function decorateStory(
return story;
}

return prepare(decoratedStory, h(story, context.args)) as VueRenderer['storyResult'];
return prepare(decoratedStory, h(story)) as VueRenderer['storyResult'];
},
(context) => prepare(storyFn(context)) as LegacyStoryFn<VueRenderer>
);
Expand Down
4 changes: 2 additions & 2 deletions code/renderers/vue3/src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const render: ArgsStoryFn<VueRenderer> = (props, context) => {
);
}

return h(Component, props, getSlots(props, context));
return () => h(Component, props, getSlots(props, context));
};

let setupFunction = (_app: any) => {};
Expand Down Expand Up @@ -54,7 +54,7 @@ export function renderToCanvas(
const renderedElement: any = elementMap.get(canvasElement);
const current = renderedElement && renderedElement.template ? renderedElement : element;
map.set(canvasElement, { vueApp: storybookApp, reactiveArgs });
return h(current, reactiveArgs);
return h(current);
},
});

Expand Down

0 comments on commit 9cee100

Please sign in to comment.