From: Matt Deacalion Date: Mon, 31 Jan 2022 19:48:29 +0000 (+0000) Subject: docs: clarify plugins don't update devtools timeline (#1002) X-Git-Tag: @pinia/testing@0.0.10~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d72b964e40e49d6b8a0238a03e1dd7e1b88e2119;p=thirdparty%2Fvuejs%2Fpinia.git docs: clarify plugins don't update devtools timeline (#1002) Co-authored-by: Eduardo San Martin Morote --- diff --git a/packages/docs/core-concepts/plugins.md b/packages/docs/core-concepts/plugins.md index 9319d5ee..25d89622 100644 --- a/packages/docs/core-concepts/plugins.md +++ b/packages/docs/core-concepts/plugins.md @@ -131,6 +131,8 @@ pinia.use(({ store }) => { }) ``` +Note that state changes or additions that occur within a plugin (that includes calling `store.$patch()`) happen before the store is active and therefore **do not trigger any subscriptions**. + :::warning If you are using **Vue 2**, Pinia is subject to the [same reactivity caveats](https://vuejs.org/v2/guide/reactivity.html#Change-Detection-Caveats) as Vue. You will need to use `set` from `@vue/composition-api` when creating new state properties like `secret` and `hasError`: