How to use storybook with pinia #17685
-
Good afternoon, |
Beta Was this translation helpful? Give feedback.
Answered by
romanslonov
Jun 28, 2022
Replies: 2 comments 4 replies
-
It's simple. Just init pinia store in // .storybook/preview.js
import { app } from '@storybook/vue3';
import { createPinia } from 'pinia';
const pinia = createPinia();
app.use(pinia); |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
Stygmates
-
Storybook documentation has been updated to show how to use pinia with storybook: https://storybook.js.org/tutorials/intro-to-storybook/vue/en/data/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's simple. Just init pinia store in
.storybook/preview.js
as you usually do it in vue app (v3).