
devourment77
u/devourment77

I am in the process of updating an older vue2 project to vue3 + typescript. Many of the components are options API.
I am seeing some X is possibly null typescript errors, which I was not expecting as I am using a computed method to check.
Example Template
<div v-if="statsReady">
<h3>Stats</h3>
<div>
{{ stats.completeCount }} // error -> stats is possibly null
</div>
</div>
Example Computed
data() {
return {
loading: false,
error: '',
stats: null as Stats | null,
}
},
computed: {
statsReady() {
return !this.error && !this.loading && this.stats
},
}
If I change to `v-if=
When using <script setup syntax with a pinia store, I understand saving the store to a const means I can use it within the template... but I believe it also will return the entire store from the setup() function.
import { useMyStore } from '@/stores/my-store'
const myStore = useMyStore()
If I am only using one prop from the store, say myStore.someProp and myStore.anotherProp changes, does that mean the component will re-render because the entire store was returned from the setup() function (even though the template may only be using myStore.someProp ) ?
I know I can use storeToRefs but the myStore would still be a const, which I believe will be returned. T
We're starting the migration to Pinia and notes that the migration docs say it is possible to use both Vuex3 and Pinia so you can go module by module:
https://pinia.vuejs.org/cookbook/migration-vuex.html
For large projects you may wish to do this conversion module by module rather than converting everything at once. You can actually mix Pinia and Vuex together during the migration so this approach can also work and is another reason for naming the Pinia directory stores instead.
But, on the getting started page, it mentions they cannot be used used together for vue 2 :(
Hello All,
This question is targeted more to dojocho / sensei (USA). I have used karateinsurance.com for 10+ years without issue and they covered live / sharp sword usage. While renewing this year, I was informed they no longer offer any live / sharp blade coverage :( It did not matter that it was limited to advance practitioners and tameshigiri (and not kumitachi).
Anyone else run into this issue? Who are you all using for your insurance?
Thanks!
We'll be starting a large redesign project soon and the existing project is using Laravel 8 + vue2, with a mix of blade only routes, blade + vue component routes, and full SPA vue routes (client-side render only). For the most part it is fine, but there are more and more situations of component duplication coming up between blade and vue and it would be great to consolidate the UI (some of our routes require SSR for SEO reasons).
I'd have built traditional SPAs before and having a completely separate API and UI project ends up doubling infrastructure (if SSR is required, you cannot just use s3 + cloudfront for UI), increased complexity around local dev setup (running both projects) and sy
