Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quasar supports Pinia from @quasar/app-webpack v3.4.0 #7

Open
Grawl opened this issue Mar 14, 2022 · 0 comments
Open

Quasar supports Pinia from @quasar/app-webpack v3.4.0 #7

Grawl opened this issue Mar 14, 2022 · 0 comments

Comments

@Grawl
Copy link

Grawl commented Mar 14, 2022

Release: @quasar/app-webpack-v3.4.0

I just tested it and it works.

  1. I ran npm init quasar
  2. In wizard steps, I chosen Pinia

The code I got is pretty simple:

src/stores/index.ts

import { store } from 'quasar/wrappers'
import { createPinia } from 'pinia'

/*
 * If not building with SSR mode, you can
 * directly export the Store instantiation;
 *
 * The function below can be async too; either use
 * async/await or return a Promise which resolves
 * with the Store instance.
 */

export default store((/* { ssrContext } */) => {
  const pinia = createPinia()

  // You can add Pinia plugins here
  // pinia.use(SomePiniaPlugin)

  return pinia
})

After test, I updated my project with a lot of Pinia stores, and it all works fine.

So I think we should update this repository to work with official framework support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant