Store Global shared Store that can't live inside components
nbcs-composables is a collection of store and composable objects. There are some components that uses Vuex and others uses the composition api. This is a dependent library meant to be used with other molecule/organisms.
-
It's probably ideal to have 1 to 1 stores for higher level components if possible so they can be bundled up together naturally, but if there are, and there probably will be, shared stores, put them here.
-
Maybe use vue-connect for shared store?
Project setup
yarn install
Compiles and hot-reloads for development
yarn serve
Compiles and minifies for production
yarn build
Run your unit tests
yarn test:unit
Lints and fixes files
yarn lint
Usage
Composable Example:
import { useTailwind } from 'nbcs-composables';
export default {
…
setup() {
const { breakpoints } = useTailwind();
return {
breakpoints,
};
},
…
}
Please refer to the components/composables/src/composables
directory to see a list of available composables to use from and see what available functions there are to be exported.
Vuex Example:
import { Scores } from 'nbcs-composables';
const store = new Vuex.Store({
modules: {
Scores,
},
});
Stores are stored in the components/composables/src/store
directory.