Tabletop
Tabletop
Explore posts from servers
KPCKevin Powell - Community
Created by Tabletop on 12/21/2024 in #front-end
access Pinia variable dynamically
//can I do this??
const store = useStore()
const { ${my_dynamic_var } from storeToRefs(store);
//can I do this??
const store = useStore()
const { ${my_dynamic_var } from storeToRefs(store);
can this be done earlier today I also did
store[props.pinia] = my_new_var //this works
store[props.pinia] = my_new_var //this works
this one works
1 replies
NNuxt
Created by Tabletop on 12/9/2024 in #❓・help
New to Nuxt: should I do all data fetching in Pinia?
should I put all data fetch operations into Pinia to reduce code duplication? what are the pros and cons of this?
7 replies
KPCKevin Powell - Community
Created by Tabletop on 12/7/2024 in #front-end
VueRouter many different routes from one .vue file
usually you would have a older and .vue for each route like /tags/[tag].vue or /about.vue but I can do my who app in one file so I just wanted to know how can I see all routes this one file like index.vue for example I have noticed [...all].vue
<router-link :to="{ name: '/', params: my_actual_page_name }">
my_actual_page_name
</router-link>
<router-link :to="{ name: '/', params: my_actual_page_name }">
my_actual_page_name
</router-link>
so maybe this will work
1 replies
KPCKevin Powell - Community
Created by Tabletop on 12/6/2024 in #front-end
Vue, Pinia, VueRouter and await
When data fetching, what is the best way to fetch and then store in Pinia? use await inside your store?? Or have variables in your store and fetch from a composible in a index.vue I would prefer to use just one .vue file if possible, but it seems at the moment, I have to use multiple like /tags/my_tag which are done by just making a tagsfolder and puting [my_tag].vuein there My reason for usia a pinia store is to sync data across .vue files I'm trying different combinations but keep breaking my app!
8 replies