Skip to content

How to use storybook with pinia #17685

Answered by romanslonov
Stygmates asked this question in Help
Discussion options

You must be logged in to vote

It's simple. Just init pinia store in .storybook/preview.js as you usually do it in vue app (v3).

// .storybook/preview.js

import { app } from '@storybook/vue3';
import { createPinia } from 'pinia';

const pinia = createPinia();

app.use(pinia);

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@iambumblehead
Comment options

@elenakout
Comment options

@mukhrr
Comment options

Answer selected by Stygmates
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants