Skip to content

Instantly share code, notes, and snippets.

View michaelegregious's full-sized avatar

Michael Bush michaelegregious

View GitHub Profile
@michaelegregious
michaelegregious / ExampleView.vue
Last active December 2, 2024 16:15 — forked from tomscytale/ExampleView.vue
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(/^\//, '');
@michaelegregious
michaelegregious / ExampleView.vue
Created December 2, 2024 15:00 — forked from tomscytale/ExampleView.vue
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(/^\//, '');