Skip to content

Releases: vuejs/pinia

v2.0.0-alpha.2

25 Sep 08:11
Compare
Choose a tag to compare
v2.0.0-alpha.2 Pre-release
Pre-release

Please refer to CHANGELOG.md for details.

v2.0.0-alpha.1

22 Sep 13:54
Compare
Choose a tag to compare
v2.0.0-alpha.1 Pre-release
Pre-release

Please refer to CHANGELOG.md for details.

馃殌 Release 0.1.0

22 Sep 08:37
Compare
Choose a tag to compare
  • feat: access the state and getters through this (#190) (7bb7733)
  • refactor: use defineComponent (cae8fca)

Breaking changes

There is no longer a state property on the store, you need to directly access any property

store.state.counter
// becomes
store.counter

getters no longer receive parameters, directly call this.myState to read state and other getters:

getters: {
  doubleCount: state => state.counter * 2
  // becomes
  doubleCounte() {
    return this.counter * 2
  }
}

More at #190

馃殌 Release 0.0.7

13 Jul 16:54
Compare
Choose a tag to compare
  • fix: make pinia work with nuxt Composition API plugin (#180) (f4e2583)

馃殌 Release 0.0.6

25 May 12:41
Compare
Choose a tag to compare
  • refactor: fix type issues (d5265f6)
  • fix: avoid nuxtContext in spa mode (#170) (a0d10f9)
  • docs: disableVuex in nuxt.config.js (f3e9a32)
  • feat: support raw Vue SSR (#90) (91d7b38)

馃殌 Release 0.1.0-alpha.1

30 Jan 13:29
Compare
Choose a tag to compare
Pre-release
  • refactor: rename details about branch (786ea50)
  • Merge branch 'master' into next (d1285e3)
  • chore: up deps (957ae31)
  • docs: update demo link (2361d8f)
  • docs: clearer implications of where to call useStore (1d6aee1)
  • chore(deps-dev): bump rollup from 1.29.0 to 1.29.1 (c3454fe)
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin (695f1fa)
  • chore(deps-dev): bump codecov from 3.6.1 to 3.6.2 (16fcc42)
  • chore(deps-dev): bump @typescript-eslint/parser from 2.16.0 to 2.17.0 (331071a)
  • chore(deps-dev): bump @types/jest from 24.9.0 to 24.9.1 (a00ccd8)
  • chore(deps-dev): bump jest and ts-jest (29ec77f)
  • feat: make it work with vue 3 (54505cb)

馃殌 Release 0.0.5

20 Jan 18:29
Compare
Choose a tag to compare

BREAKING CHANGES

After taking a deeper look at what is necessary for SSR, a few things had to change:

  • Actions are no longer just functions, they must be attached to the store by being passed directly to createStore and they are called as methods of the store (e.g. store.reset())
  • createStore now takes an object instead of positional arguments
// before
export const useMainStore = createStore(
  // id
  'main',
  // state
  () => ({ counter: 0 }),
  // getters
  {
    doubleCount: state => state.counter * 2,
  }
)

export function reset() {
  const store = useMainStore()
  store.state.counter = 0
}
// now
export const useMainStore = createStore({
  id: 'main',
  state: () => ({ counter: 0 }),
  getters: {
    doubleCount: state => state.counter * 2,
  },
  actions: {
    reset() {
      this.state.counter = 0
    },
  },
})
  • feat: allow using getters in other getters (859eeb3)
  • feat: allow empty state option to make it easy to group stores (810e0f0)
  • feat: add nuxt module (4c0ef7a)
  • feat: allow passing the req to useStore (f250622)
  • fix: bind the actions to the store (5e262da)
  • feat: allow useStore to be called within a store (fdf6b45)
  • feat: handle SSR state hydration (2998d53)
  • feat: state hydration (db72247)
  • feat: export types, support state hydration (89996ed)

馃殌 Release 0.0.4

09 Jan 17:21
Compare
Choose a tag to compare

馃殌 Release 0.0.3

31 Dec 10:35
Compare
Choose a tag to compare