Is it considered a best practice to utilize a prop value within a computed property function of a component? If so, how can I construct the return statement using this prop?
Carousel.vue
props: [
'source',
],
computed: {
items () {
return this.$store.state.(prop value source here).list
}
}
store/categorya.js (the same for categoryb and categoryc)
import categorya from '(...)'
export const state = () => ({
list: categorya
})
Update
Index.vue
carousel(source="categorya")
carousel(source="categoryb")
carousel(source="categoryc")