-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
use createNamespacedHelpers is success.
import { useStore } from 'vuex';
import { createNamespacedHelpers } from 'vuex-composition-helpers';
const store = useStore();
const { useState } = createNamespacedHelpers(store, 'home');
const { count } = useState(['count']); // can get count value
console.log(count);
Inline namespacing get error.
import { useStore } from 'vuex';
import { useState } from 'vuex-composition-helpers';
const store = useStore();
console.log(store.state.home.count); // can get count value
const { count } = useState('home', ['count']); // can't get count value,count is undefined
console.log(count);
Metadata
Metadata
Assignees
Labels
No labels