From f6ebe8c854389229be30b9ffbca5f1384ab2aaa7 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 3 Mar 2021 16:14:03 +0100 Subject: [PATCH] docs: remove old functions --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4fdb0697..3f6be5d0 100644 --- a/README.md +++ b/README.md @@ -317,16 +317,12 @@ In a Raw Vue SSR application you have to modify a few files to enable hydration ```js // entry-server.js -import { getRootState, PiniaSsr } from 'pinia' - -// install plugin to automatically use correct context in setup and onServerPrefetch -Vue.use(PiniaSsr) - export default (context) => { + const pinia = createPinia() /* ... */ context.rendered = () => { // pass state to context - context.piniaState = getRootState(context.req) + context.piniaState = pinia.state.value } /* ... */ } @@ -345,8 +341,11 @@ export default (context) => { // entry-client.js import { setStateProvider } from 'pinia' +const pinia = createPinia() +// install and inject pinia... +// ... // inject ssr-state -setStateProvider(() => window.__PINIA_STATE__) +pinia.state.value = window.__PINIA_STATE__ ``` ### Accessing other Stores -- 2.47.3