Skip to content

Commit

Permalink
docs(zh): add mission link in introduction.md (#2584)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gehbt committed Feb 19, 2024
1 parent ea5c974 commit eb420ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/docs/zh/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Pinia [起始](https://github.com/vuejs/pinia/commit/06aeef54e2cad66696063c62829

## 为什么你应该使用 Pinia?%{#why-should-i-use-pinia}%

Pinia 是 Vue 的专属状态管理库,它允许你跨组件或页面共享状态。如果你熟悉组合式 API 的话,你可能会认为可以通过一行简单的 `export const state = reactive({})` 来共享一个全局状态。对于单页应用来说确实可以,但如果应用在服务器端渲染,这可能会使你的应用暴露出一些安全漏洞。 而如果使用 Pinia,即使在小型单页应用中,你也可以获得如下功能:
Pinia 是 Vue 的专属状态管理库,它允许你跨组件或页面共享状态。如果你熟悉组合式 API 的话,你可能会认为可以通过一行简单的 `export const state = reactive({})` 来共享一个全局状态。对于单页应用来说确实可以,但如果应用在服务器端渲染,这可能会使你的应用暴露出一些[安全漏洞](https://cn.vuejs.org/guide/scaling-up/ssr#cross-request-state-pollution)。 而如果使用 Pinia,即使在小型单页应用中,你也可以获得如下功能:

- Devtools 支持
- 追踪 actions、mutations 的时间线
Expand Down

0 comments on commit eb420ee

Please sign in to comment.