]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: devalue
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 31 Mar 2021 10:25:33 +0000 (12:25 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 31 Mar 2021 10:25:33 +0000 (12:25 +0200)
docs/ssr/index.md
docs/ssr/nuxt.md

index e256e9f9f873808081c859b7cc1e8b2cf2da6401..1da1208251054c1c175200f10521ba2c54c5a627 100644 (file)
@@ -49,7 +49,7 @@ export default {
 
 ## State hydration
 
-To hydrate the initial state, you need to make sure the rootState is included somewhere in the HTML for Pinia to pick it up later on:
+To hydrate the initial state, you need to make sure the rootState is included somewhere in the HTML for Pinia to pick it up later on. Depending on what you are using for SSR, you should escape the state for security reasons. We recommend using [@nuxt/devalue](https://github.com/nuxt-contrib/devalue) which is the used by Nuxt.js.
 
 ```js
 import { createPinia } from 'pinia'
index 404fd5cda32c1864ee1d890d33fce20dbc7fbb70..7b31696335742fce57fd6045c0d42e27fb6705e8 100644 (file)
@@ -1,6 +1,6 @@
 # Nuxt.js
 
-Using Pinia with [Nuxt.js](https://nuxtjs.org/) is easier since Nuxt takes care of a lot of things when it comes to _server side rendering_.
+Using Pinia with [Nuxt.js](https://nuxtjs.org/) is easier since Nuxt takes care of a lot of things when it comes to _server side rendering_. For instance, **you don't need to care about serialization nor XSS attacks**.
 
 ## Installation