Skip to content

Instantly share code, notes, and snippets.

View michaelegregious's full-sized avatar

Michael Bush michaelegregious

View GitHub Profile
@tomscytale
tomscytale / ExampleView.vue
Created February 2, 2023 12:07
Shim library allowing namespaced vuex stores to be easily used in Vue3
<script setup lang="ts">
import Loading from '@/components/Loading.vue';
import { computed, onMounted } from 'vue';
import { mapActions, mapState } from '@/store/stateLib';
const { loading, items } = mapState('page');
const { loadItems } = mapActions('page');
const page = computed(() => {
const path = route.path.replace(/^\//, '');