You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
The text was updated successfully, but these errors were encountered:
@chinavane BTW, it's preferable to ask questions on StackOverflow instead inside GitHub issues, since a question here will be converted to closed issue and wont help future developers that will meet the same question 🤓.
use createNamespacedHelpers is success.
Inline namespacing get error.
The text was updated successfully, but these errors were encountered: