-
-
Notifications
You must be signed in to change notification settings - Fork 989
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #370 BREAKING_CHANGE: It's now necessary to create a pinia instance and install it: ```js import { createPinia } from 'pinia' const pinia = createPinia() Vue.use(pinia) ``` The `pinia` instance can be passed to `useStore(pinia)` when called outside of a `setup()` function. Check the SSR section of the docs for more details. BREAKING_CHANGE: `setActiveReq()` and `getActiveReq()` have been replaced with `setActivePinia()` and `getActivePinia()` respectively. `setActivePinia()` can only be passed a `pinia` instance created with `createPinia()`. BREAKING_CHANGE: Since req as a parameter was replacetd with `pinia`, `getRootState` is no longer necessary. Replace it with `pinia.state.value` to **read and write** the root state`. BREAKING_CHANGE: `PiniaSsr` is no longer necessary and has been removed.
- Loading branch information
Showing
2 changed files
with
10 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
export { defineStore } from './store' | ||
export { | ||
setActiveReq, | ||
setStateProvider, | ||
getRootState, | ||
setActivePinia, | ||
createPinia, | ||
Pinia, | ||
PiniaStorePlugin, | ||
PiniaCustomProperties, | ||
createPinia, | ||
setActivePinia, | ||
getActivePinia, | ||
} from './rootStore' | ||
export { defineStore } from './store' | ||
export { | ||
StateTree, | ||
Store, | ||
StoreWithActions, | ||
StoreWithGetters, | ||
StoreWithActions, | ||
StoreWithState, | ||
} from './types' | ||
export { PiniaSsr } from './ssrPlugin' | ||
|
||
export { createStore } from './deprecated' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters