From: hafdon <39073287+hafdon@users.noreply.github.com> Date: Fri, 11 Mar 2022 18:56:50 +0000 (-0700) Subject: docs: move preferences from parameter to state (#1137) X-Git-Tag: @pinia/testing@0.0.10~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85992e97e263c05f23ce3b270ff2fe312f4ec4f2;p=thirdparty%2Fvuejs%2Fpinia.git docs: move preferences from parameter to state (#1137) --- diff --git a/packages/docs/core-concepts/actions.md b/packages/docs/core-concepts/actions.md index a627e22f..7b5a6426 100644 --- a/packages/docs/core-concepts/actions.md +++ b/packages/docs/core-concepts/actions.md @@ -76,10 +76,11 @@ import { useAuthStore } from './auth-store' export const useSettingsStore = defineStore('settings', { state: () => ({ + preferences: null, // ... }), actions: { - async fetchUserPreferences(preferences) { + async fetchUserPreferences() { const auth = useAuthStore() if (auth.isAuthenticated) { this.preferences = await fetchPreferences()